Pandas read csv Custom Date Format: Difference between revisions
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
=<tt>date_format</tt> Parameter= | =<tt>date_format</tt> Parameter= | ||
=<tt>date_parser</tt> Parameter= | =<tt>date_parser</tt> Parameter= | ||
Revision as of 01:30, 9 October 2023
Internal
Overview
A CSV column can be parsed as date with:
df = pd.read_csv("./timeseries.csv", parse_dates=["date"])
This assumes a "2023-10-31" format. If the string format is different there are several options: