aave_v3_calculate_mean

Documentation for eth_defi.aave_v3.rates.aave_v3_calculate_mean function.

aave_v3_calculate_mean(df, time_bucket, attribute, token='')[source]

Calculate mean values for a given time bucket (e.g. 1 day) and given attribute. Attribute can be e.g. deposit_apr, variable_borrow_apr, stable_borrow_apr, deposit_apy, variable_borrow_apy, stable_borrow_apy. The dataframe must be indexed by timestamp. Returns a new DataFrame, or a tuple of DataFrames if a tuple of attributes was specified.

Parameters
  • df (pandas.core.frame.DataFrame) –

  • time_bucket (pandas._libs.tslibs.timedeltas.Timedelta) –

  • attribute (Union[str, Tuple]) –

  • token (str) –

Return type

Union[pandas.core.frame.DataFrame, Tuple]