今天使用pandas读取excle数据,读取失败,显示NAN和…
经过查询,发现
pandas默认读取空字符串时会读出nan,在使用pandas.read_excels(file)方法时,加上keep_default_na=False即可解决
关于省略号,由于列较多,需要设置选项pd.set_option(‘display.max_columns’, None),即可完全读取出来
同理,行较多时,也可添加pd.set_option(‘display.max_rows’, None)
读取成功
使用pandas读取数据,显示NAN和...
于 2022-06-06 16:22:11 首次发布