-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
BUG: Pandas 1.1.3 read_csv raises a TypeError when dtype, and index_col are provided, and file has >1M rows #37094
Comments
Possibly caused by #36266 (having some trouble running bisects on my end) problem arises because the default |
I agree, the code here: Is suspicious. |
Confirmed this is a regression compared to 1.0.x. Thanks for the report! |
I can confirm I have the same problem, which arises as soon as I pass the threshold of 1M rows. I only need to specify Pandas 1.1.3 And as a temporary workaround, I am reading without df = pd.read_csv(filepath, nrows=1000001)
df.set_index(0) # for example if I wanted the first column |
I have the same problem. any solution? |
my solution was to downgrade to 1.1.2 and it works. |
more minimal example not involving read_csv
|
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.
Code Sample, a copy-pastable example
Problem description
When
ROWS = 1000001
, I get the following traceback:Expected Output
With pandas 1.1.2, or ROWS = 1000000, it works fine.
Output of
pd.show_versions()
pandas : 1.1.3
numpy : 1.19.2
pytz : 2020.1
dateutil : 2.8.1
pip : 20.2.3
setuptools : 50.3.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : 7.16.1
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: