to_pd_series#

static FredHelpers.to_pd_series(data, name)[source]#

Accepts a Series or a DataFrame with ‘date’ and ‘value’ columns and returns a float Series with DatetimeIndex and the given name.

Parameters:
  • data (pd.Series | pd.DataFrame) – Input data to be converted.

  • name (str) – Name to assign to the resulting Series.

Returns:

A float Series with DatetimeIndex and the given name.

Return type:

pandas.Series

Raises:

TypeError – If the input is neither a pd.Series nor a pd.DataFrame.