get_shifted_dfs

get_shifted_dfs(covid_df: pandas.core.frame.DataFrame, time_shift: Union[int, float] = 1, time_shift_unit: str = 'D') → Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame][source]

Helper function to shift the date of the covid data by a given time and gain DataFrames which can be used to calculate the growth and growth rate.

Parameters
  • covid_df (pd.DataFrame) – Full covid19 data from a data_source

  • time_shift ([int,float], optional) – value by which the time should be shifted, by default 1

  • time_shift_unit (str, optional) – unit of the time shift , by default “D”

Returns

shifted and unshifted covid19 data, with date, parent_region and region as index

Return type

Tuple[pd.DataFrame, pd.DataFrame]