Created
November 17, 2020 14:24
-
-
Save brinnaebent/aae5074f56b82854619b008706d5b804 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We will use pd.to_datetime() to convert the Time column to a datetime object. We need to tell Python what the current format is. | |
df['DateTime'] = pd.to_datetime(df['DateTime'], format='%Y-%m-%dT%H:%M:%S') | |
# I would also like to make a new column, "Day", with just the Day of the DateTime column. | |
df['Day'] = df['DateTime'].dt.date |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment