5.3. cpforager.utils.convert_utc_to_loc

cpforager.utils.convert_utc_to_loc(df, local_timezone)

Convert datetime from UTC to the local timezone.

Parameters:
  • df (pandas.DataFrame) – dataframe with a datetime column at the UTC timezone.

  • local_timezone (str) – local timezone following the pytz nomenclature (see pytz.all_timezones).

Returns:

the dataframe with a datetime column converted the local timezone.

Return type:

pandas.DataFrame