Hi I wanted to do some work with my binance.com trade exports but it seems as if pandas can't read the orignal nor copies of the original report from binance.
I checked with Nic Scorazzos answer (Python Pandas read_excel returns empty Dataframe) to see if the file is indeed an excel workbook and not a strict open xml spreadsheet but it seems to me that my file is a workbook.
I checked with the file explorer and the default on 'save as' and it both shows 'Microsoft Excel Workbook (.xlsx)'
Resaving the file as a workbook helps but I want to import them to my python code directly without manually working on them.
I'm on OSX with pandas 1.2 and necessary plugins. Pandas reads other .xlxs files normally, it's just with the binance exports
For those who want to know my code
import pandas as pd
import numpy as np
df = pd.read_excel('binanceExport.xlsx')
df
returns
Date(UTC)
---------
which is the first cell in the spreadsheet
whereas
print(df)
returns
Empty DataFrame
Columns: [Date(UTC)]
Index: []
EDIT 1:
I tried saving it as an Open Strict XML Spreadsheet (the other .xlsx) and python returns an IndexError: list index out of range
strange, I really believed the original to be an OpenStrictXMLSpreadsheet somehow but as it seems it's not...
read_excel. In particular, try usingopenpyxlengine, because often it's better at wowrking with newer Excel formats.