-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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: read_csv raises an error when both prefix
and names
are set to None
#42387
Comments
in Python, passing None is not the same as not passing optional arguments. the api docs for 1.2 (https://pandas.pydata.org/pandas-docs/version/1.2.0/reference/api/pandas.read_csv.html) clearly state the accepted types for both the |
we would take a PR to fix this. |
Even Eland has a similar issue, where we are passing both as None. |
@simonjayhawkins Are you fine with patching this? I can send a PR if so, but it would probably miss the 1.3.1 cut. |
sure. we discussed this on the dev call and patching this is fine. 1.3.1 probably Sunday. |
Thanks ! |
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.
Hi everyone, I'm running into this issue since pandas 1.3.0:
Code Sample, a copy-pastable example
raises
Problem description
With
names=None
andprefix=None
those parameters shouldn't be considered as specified, and the code should run as if they were not passed as keyword arguments.This is due to the changes in this PR #41446 that changed the default values of those two parameters from
None
tono_default
Expected Output
The code should load the csv using the default behavior as if
names
andprefix
were not passed as keyword argumentsOutput of
pd.show_versions()
pandas : 1.3.0
numpy : 1.19.5
pytz : 2018.9
dateutil : 2.8.1
pip : 19.3.1
setuptools : 57.0.0
Cython : 0.29.23
pytest : 3.6.4
hypothesis : None
sphinx : 1.8.5
blosc : None
feather : 0.4.1
xlsxwriter : None
lxml.etree : 4.2.6
html5lib : 1.0.1
pymysql : None
psycopg2 : 2.7.6.1 (dt dec pq3 ext lo64)
jinja2 : 2.11.3
IPython : 5.5.0
pandas_datareader: 0.9.0
bs4 : 4.6.3
bottleneck : 1.3.2
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.2.2
numexpr : 2.7.3
odfpy : None
openpyxl : 2.5.9
pandas_gbq : 0.13.3
pyarrow : 3.0.0
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : 1.4.18
tables : 3.4.4
tabulate : 0.8.9
xarray : 0.18.2
xlrd : 1.1.0
xlwt : 1.3.0
numba : 0.51.2
The text was updated successfully, but these errors were encountered: