marmot.plottingmodules.plotutils.timeseries_modifiers.sort_duration#
- sort_duration(df: pandas.core.frame.DataFrame, col: str) pandas.core.frame.DataFrame [source]#
Converts a dataframe time series into a duration curve.
- Parameters
df (pd.DataFrame) – pandas multiindex dataframe.
col (str) – Column name by which to sort.
- Returns
Dataframe with values sorted from largest to smallest.
- Return type
pd.DataFrame