-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
WARN read_table with infer_datetime_format doesn't show FutureWarning #51017
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
Comments
To parametrise, you might want to use
and then use |
Also, this should be a |
take |
Running your first code snippet which should have produced a FutureWarning, I did not receive any warning. I tried figuring out how to enable warnings in pandas by running pd.reset_option('all'). This resulted in the appearance of other FutureWarnings but still, it didn't produce the same FutureWarning like the one you received: "FutureWarning: The argument 'date_parser' is deprecated..." I'm using pandas v1.5.3. Do you know why this is the case? For now, I'll work on adding in the warning for the second code snippet and seeing if that one appears properly. |
hey @kathleenhang , sorry, my bad, I was running that from a branch. updating now, sorry for the confusion, thanks for having asked |
@kathleenhang I've updated the example in the issue - do you receive a warning now if you run it? |
@MarcoGorelli Hey there, I still don't receive any warning. I'm using Python 3.9.1 if that helps. |
Does it work if you run
? |
looks like you need to rebuild the C extensions: https://pandas.pydata.org/docs/dev/development/contributing_environment.html#step-3-build-and-install-pandas |
I also was not inside of my Docker virtual environment. I just set that up yesterday, and I am still understanding how it works, its purpose, and when I should have it activated. I had built my C extensions inside of the Docker virtual environment, but since I was working outside of the virtual environment, it didn't have the updated C extensions. I see the warning now. Thanks @MarcoGorelli ! |
Running
results in
However,
shows no warning
Task is just to add a warning to this function
pandas/pandas/io/parsers/readers.py
Lines 1151 to 1209 in 1951b51
similarly to how is already done here:
pandas/pandas/io/parsers/readers.py
Lines 887 to 895 in 1951b51
Finally, you'll need to add a test: you can duplicate
pandas/pandas/tests/io/parser/test_parse_dates.py
Lines 1293 to 1303 in 9991d5e
but for
read_table
(or parametrise overparser.read_csv_check_warnings
andparser.read_table_check_warnings
). Note that you'll need to addsep=','
The text was updated successfully, but these errors were encountered: