Skip to content

BUG: read_excel fails to retrieve complete data / returns empty dataframe #39284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 3 tasks
thuwon opened this issue Jan 20, 2021 · 1 comment
Closed
2 of 3 tasks
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@thuwon
Copy link

thuwon commented Jan 20, 2021

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • (optional) I have confirmed this bug exists on the master branch of pandas.


Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Code Sample, a copy-pastable example

import pandas as pd 
import numpy as np
import os

df = pd.read_excel('BinanceExport.xlsx')
df

Problem description

pandas.read_excel doesn't correctly read certain binance.com xlsx exports (Microsoft Workbook format)

Trying to my binance exports returns an empty dataframe

df = pd.read_excel('BinanceExport.xlsx')
df

>>> Date(UTC)
    ---------

or

df = pd.read_excel('BinanceExport.xlsx')
df

>>> Empty DataFrame
    Columns: [Date(UTC)]
  

  Index: []

Renaming the file doesn't help, but manually resaving does

It seems related to this issue #39250
but mine isn't a corrupted file nor does it return an error

I posted a question on stackoverflow and the export is downloadable down below

Expected Output

return complete dataframe

Output of pd.show_versions()

[INSTALLED VERSIONS

commit : 3e89b4c
python : 3.9.0.final.0
python-bits : 64
OS : Darwin
OS-release : 19.6.0
Version : Darwin Kernel Version 19.6.0: Tue Nov 10 00:10:30 PST 2020; root:xnu-6153.141.10~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : en_US.UTF-8
LANG : None
LOCALE : en_US.UTF-8

pandas : 1.2.0
numpy : 1.19.2
pytz : 2020.5
dateutil : 2.8.1
pip : 20.2.4
setuptools : 49.6.0.post20201009
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.18.1
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : 3.0.6
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : 2.0.1
xlwt : None
numba : None]

BinanceExport.xlsx

@thuwon thuwon added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jan 20, 2021
@thuwon
Copy link
Author

thuwon commented Jan 20, 2021

my bad #39001

@thuwon thuwon closed this as completed Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

1 participant