get_timestamp_index#

API documentation for tradingstrategy.utils.df_index.get_timestamp_index Python function.

get_timestamp_index(df)[source]#

Get DateTimeIndex for pair OHCLV data.

See flatten_dataframe_datetime_index() for comments,

  • Return df.index or extract timestamp component from MultiIndex

Returns:

DataFrame copy with a timestamp-only index

Parameters:

df (DataFrame) –

Return type:

DatetimeIndex