I currently encounter a deprecation warning when using the pd.read_csv function with date_parser.
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'.
this is supported by the Pandas documentation, which states:
Deprecated since version 2.0.0: Use date_format instead, or read in as object and then apply to_datetime() as-needed.
this warning was obtained whilst running the following line of code:
|
df = pd.read_csv(path, sep=';', header=0, |
|
parse_dates=parse_dates, date_parser=date_parser) |
as per the warning and the supporting Pandas documentation, I'm recommending that we read data in as object dtype and then call pd.to_datetime() to convert each of these columns from object dtype to datetime64[ns] dtype.
I've submitted a pull request here.
ty
I currently encounter a deprecation warning when using the
pd.read_csvfunction withdate_parser.this is supported by the Pandas documentation, which states:
this warning was obtained whilst running the following line of code:
simfin/simfin/load.py
Lines 154 to 155 in 413ec16
as per the warning and the supporting Pandas documentation, I'm recommending that we read data in as
objectdtype and then callpd.to_datetime()to convert each of these columns fromobjectdtype todatetime64[ns]dtype.I've submitted a pull request here.
ty