Skip to content
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

FutureWarning: The argument 'date_parser' is deprecated and will be removed in a future version. Please use 'date_format' instead, or read your data in as 'object' dtype and then call 'to_datetime' #972

Open
christophscheuch opened this issue Jul 31, 2023 · 2 comments

Comments

@christophscheuch
Copy link

When I use DataReader() to fetch data from "famafrench":

import pandas as pd # 2.0.3
import pandas_datareader as pdr # 0.10.0

start_date = "1960-01-01"
end_date = "2021-12-31"

factors_ff_monthly_raw = pdr.DataReader(name="F-F_Research_Data_Factors", data_source="famafrench", start=start_date, end=end_date)[0]

Then I get the following warning:

FutureWarning: The argument 'date_parser' is deprecated and will be removed in a future version. Please use 'date_format' instead, or read your data in as 'object' dtype and then call 'to_datetime'

Any way to avoid this warning or does the pandas-datareader module need an update?

@jusrojasrod
Copy link

Have you any update on this? I am with the same issue.

@christophscheuch
Copy link
Author

I decided to turn off all future warnings for the project that I'm currently working on. Not elegant, but removes them from print outputs in documents:

import warnings
warnings.simplefilter(action="ignore", category=FutureWarning)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants