I would like to define a function that takes in a pandas dateframe and iterates through its columns to find if there is any date field or a timestamp which can be an object.
I would then like to convert those fields to DateTime.
In short, I would like to clean my different dataframes which can come from different sources and have different timestamps and store them.
Can you guys point me in the right direction?
def dateConversion(flattenedObject): for col in df.columns: df[col]=pd.to_datetime(df[col])