When I read data in Excel with panda, I have two problems. The first is that I have specified that the column of preview 2 is in the form of string. Why is dtype still an object? datas= pd.read_ excel(' out.xlsx ',sep=',',names=['prefecture2', 'Longitude', 'Lagtitude'],iterator=True,dtype = {'prefecture2' : str})
The second problem is that I want to convert [Fu] in the data into Fu, but there is no change after it runs. Why? datas['prefecture2']=datas['prefecture2']. str.replace ('[Fu]','fu ') in the picture is my data screenshot, only 352 lines, not too big, sincerely ask for advice, hope to give advice, thank you!