I have a pandas DataFrame df that contains Timesatamp columns.
I wish to create an iterator of rows (either via the iter.. methods or via to_dict) from df where the Timesatamp values are python datetime.
I have tried doing this
for col in df.select_dtypes(['datetime']):
df[col] = df[col].dt.to_pydatetime()
Run Code Online (Sandbox Code Playgroud)
however it seems like the columns is still Timesatamp when using the above mentioned iterator methods.
Is there a 'batch'y way to achieve this apart from manualy converting each values when …