5.4. cpforager.utils.convert_loc_to_utc
- cpforager.utils.convert_loc_to_utc(df, local_timezone)
Convert
datetime
column from the local timezone to UTC.- Parameters:
df (pandas.DataFrame) – dataframe with a
datetime
column at the local timezone.local_timezone (str) – local timezone following the pytz nomenclature (see
pytz.all_timezones
).
- Returns:
the dataframe with a
datetime
column to UTC timezone.- Return type:
pandas.DataFrame