hts.hierarchy

hts.hierarchy.utils

hts.hierarchy.utils.fetch_cols(exogenous, name) → Tuple[List[str], Optional[List[str]]][source]
hts.hierarchy.utils.groupify(root_node, df, freq='1H', nodes=None, min_count=0.1, total=None) → hts._t.NAryTreeT[source]
Parameters:
  • fillna
  • root_node (NAryTreeT) –
  • df (pandas.DataFrame) –
  • freq (str) – resample frequency
  • nodes (tuple) – Hierarchy node
  • min_count (int or float) – Minimum number of observations for a node to be used. If float, it represents a fraction of values that need to be non NaNs and must be between 0 and 1
  • total (pandas.DataFrame:) – Name of root node
hts.hierarchy.utils.hexify(df, lat_col, lon_col, levels=(6, 8)) → Optional[pandas.core.frame.DataFrame][source]
hts.hierarchy.utils.make_iterable(nodes: hts._t.NAryTreeT, prop='key')[source]
hts.hierarchy.utils.resample_count(df: pandas.core.frame.DataFrame, freq: str, colname: str) → pandas.core.frame.DataFrame[source]