marmot.plottingmodules.plotutils.timeseries_modifiers.set_timestamp_date_range#
- set_timestamp_date_range(dfs: Union[pandas.core.frame.DataFrame, List[pandas.core.frame.DataFrame]], start_date: str, end_date: str) Union[pandas.core.frame.DataFrame, Tuple[pandas.core.frame.DataFrame, ...]] [source]#
Sets the timestamp date range based on start_date and end_date strings
Takes either a single df or a list of dfs as input. The index must be a pd.DatetimeIndex or a multiindex with level timestamp.
- Parameters
- Raises
ValueError – If df.index is not of type type pd.DatetimeIndex or type pd.MultiIndex with level timestamp.
- Returns
adjusted dataframes
- Return type
pd.DataFrame or Tuple[pd.DataFrame]