[SPARK-36348][TEST] Complete test_astype for index
[SPARK-36348][TEST] Complete test_astype for index

### What changes were proposed in this pull request?
Before 3.2, there was a bug:
```
pidx = pd.Index([10, 20, 15, 30, 45, None], name="x")
psidx = ps.Index(pidx)
self.assert_eq(psidx.astype(str), pidx.astype(str))

[left pandas on spark]: Index(['10.0', '20.0', '15.0', '30.0', '45.0', 'nan'], dtype='object', name='x')
[right pandas]: Index(['10', '20', '15', '30', '45', 'None'], dtype='object', name='x')
```
So, we didn't add any test on [test_base.py int_with_nan]https://github.com/apache/spark/blob/bcc595c112a23d8e3024ace50f0dbc7eab7144b2/python/pyspark/pandas/tests/indexes/test_base.py#L2249

Now, the bug had been resolved, we complete the testcase in here.

### Why are the changes needed?
regression for SPARK-36348 and complete testcase.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Test only

Closes #34335 from Yikun/SPARK-36348.

Authored-by: Yikun Jiang <2206089eaa6cfa02a44178196e5767f367cbca91@gmail.com>
Signed-off-by: Hyukjin Kwon <2680965ad5aae29275c8fb10150cb10f5554e78b@apache.org>

nchammas/spark,wangyum/spark,holdenk/spark,JoshRosen/spark,zero323/spark,ueshin/apache-spark,cloud-fan/spark,gengliangwang/spark,apache/spark,gengliangwang/spark,nchammas/spark,shaneknapp/spark,holdenk/spark,HyukjinKwon/spark,vinodkc/spark,ueshin/apache-spark,rednaxelafx/apache-spark,vinodkc/spark,srowen/spark,vinodkc/spark,apache/spark,wangyum/spark,hvanhovell/spark,wangyum/spark,dongjoon-hyun/spark,xuanyuanking/spark,HyukjinKwon/spark,JoshRosen/spark,gengliangwang/spark,WeichenXu123/spark,JoshRosen/spark,vinodkc/spark,JoshRosen/spark,shaneknapp/spark,witgo/spark,mahak/spark,WeichenXu123/spark,zero323/spark,JoshRosen/spark,mahak/spark,shaneknapp/spark,hvanhovell/spark,WeichenXu123/spark,zzcclp/spark,dongjoon-hyun/spark,ueshin/apache-spark,witgo/spark,zzcclp/spark,zero323/spark,HyukjinKwon/spark,gengliangwang/spark,ueshin/apache-spark,apache/spark,srowen/spark,witgo/spark,apache/spark,dongjoon-hyun/spark,mahak/spark,srowen/spark,WeichenXu123/spark,zero323/spark,srowen/spark,HyukjinKwon/spark,cloud-fan/spark,rednaxelafx/apache-spark,zero323/spark,rednaxelafx/apache-spark,zzcclp/spark,holdenk/spark,zero323/spark,HyukjinKwon/spark,apache/spark,dongjoon-hyun/spark,gengliangwang/spark,ueshin/apache-spark,HyukjinKwon/spark,nchammas/spark,cloud-fan/spark,zzcclp/spark,srowen/spark,rednaxelafx/apache-spark,cloud-fan/spark,ueshin/apache-spark,wangyum/spark,zero323/spark,dongjoon-hyun/spark,nchammas/spark,nchammas/spark,zzcclp/spark,nchammas/spark,mahak/spark,cloud-fan/spark,holdenk/spark,vinodkc/spark,mahak/spark,witgo/spark,vinodkc/spark,apache/spark,shaneknapp/spark,hvanhovell/spark,JoshRosen/spark,zzcclp/spark,hvanhovell/spark,hvanhovell/spark,holdenk/spark,srowen/spark,shaneknapp/spark,xuanyuanking/spark,witgo/spark,gengliangwang/spark,wangyum/spark,dongjoon-hyun/spark,rednaxelafx/apache-spark,xuanyuanking/spark,ueshin/apache-spark,WeichenXu123/spark,hvanhovell/spark,shaneknapp/spark,wangyum/spark,rednaxelafx/apache-spark,WeichenXu123/spark,srowen/spark,rednaxelafx/apache-spark,holdenk/spark,witgo/spark,shaneknapp/spark,WeichenXu123/spark,mahak/spark,vinodkc/spark,hvanhovell/spark,cloud-fan/spark,dongjoon-hyun/spark,holdenk/spark,xuanyuanking/spark,wangyum/spark,xuanyuanking/spark,cloud-fan/spark,zzcclp/spark,mahak/spark,witgo/spark,nchammas/spark,xuanyuanking/spark,xuanyuanking/spark,gengliangwang/spark,apache/spark,JoshRosen/spark,HyukjinKwon/spark