Skip to content

Instantly share code, notes, and snippets.

@ycui1
Created November 5, 2021 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ycui1/2fe611477cbeaad60c3f5d1e4bf91830 to your computer and use it in GitHub Desktop.
Save ycui1/2fe611477cbeaad60c3f5d1e4bf91830 to your computer and use it in GitHub Desktop.
>>> pd.to_datetime("Jan 01, 2022")
Timestamp('2022-01-01 00:00:00')
>>> pd.to_datetime(["01/01/2022", "01/02/2022", "01/03/2022"])
DatetimeIndex(['2022-01-01', '2022-01-02', '2022-01-03'], dtype='datetime64[ns]', freq=None)
>>> pd.to_datetime(pd.Series(["01/01/2022", "01/02/2022", "01/03/2022"]))
0 2022-01-01
1 2022-01-02
2 2022-01-03
dtype: datetime64[ns]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment