df_index#

API documentation for tradingstrategy.utils.df_index Python module in Trading Strategy.

Module description#

DataFrame index utilities.

  • Deal with mismatch of having OHLCV data is pd.DateTimeIndex and pd.MultiIndex format

Functions#

flatten_dataframe_datetime_index(df)

Make sure we have a datetime index as the index for the DataFrame.

get_timestamp_index(df)

Get DateTimeIndex for pair OHCLV data.