I have loaded a data file into a Python pandas dataframe. I has a datetime column of the format 2015-07-18 13:53:33.280.
What I need to do is create a
column.dt. allows the datetime functions for datetime columns, like column.str. does for string-like columns
datetime-like properties API reference
import pandas as pd
# test df
df = pd.DataFrame([{'old_column':pd.Timestamp('2015-07-18 13:53:33.280')}])
df['new_column'] = df['old_column'].dt.round('15min')
df