I have to deal with a Pandas DataFrame that can be composed by different datetime columns (they can vary, I can have 0..N datetime cols). I know that each datetime column timezone is UTC and I need to convert their data to another timezone. If I do as follows:
df['a_datetime_column'].dt.tz_localize('UTC').dt.tz_convert('my_timezone')
it works but I need to know in advance the datetime column names (ok, I could get them in some way).
Is there a specific way to do this conversion on all the DataFrame at once independently from the composition of its columns?
df.dtypes? Can you filter those withdatetimetype from there?datetime64[ns]