pandas读取excel,设置默认读取类型

读取excel的时候,需要将float转为str,代码如下:

country_df = pd.read_excel('data0818/A_DATA.xls', dtype=str)
print(country_df.to_json(orient="records"))

猜你喜欢

转载自blog.csdn.net/vincent_duan/article/details/121471993
今日推荐