Pandas.read_excel: Unsupported format, or corrupt file: Expected BOF record

前端 未结 2 1593
南笙
南笙 2021-01-06 20:33

I\'m trying to use pandas.read_excel to read in .xls files. It succeeds on most of my .xls files, but then for some it errors out with the following error message:



        
2条回答
  •  萌比男神i
    2021-01-06 21:11

    I solved this problem loading it with pd.read_table (it loads everything into one column)

    df = pd.read_table('path/to/xls_file/' + 'my_file.xls')
    

    then I split this column with

    df = df['column_name'].str.split("your_separator", expand=True)
    

提交回复
热议问题