October 2019
Beginner to intermediate
674 pages
16h 43m
English
Consider the following DataFrame with a column containing strings representing dates and a column containing numeric values:
ts_df = pd.DataFrame({"ts_col": ["2013-01-01", "2015-02-10", "2016-10-24"], "value": [5, 6, 9]})
ts_df
The following is the output:

The datatype of the time series column can be seen to be an object and not a timestamp. The following code and its output confirms that:
ts_df.dtypes
The following is the output:

The to_datetime function ...
Read now
Unlock full access