arcus-azure/arcus.ml

Consider the time column in the time slice method

Closed this issue · 2 comments

The signature of the time_slice contains a time_column , which is ignored and it's just assumed that the dataframe contains a DateTimeIndex.
Check should be so that if there is no DateTimeIndex, there should be one created, using that column.

def time_slice(df: pd.DataFrame, time_column:str, start: datetime.datetime = None, end: datetime.datetime = None):

I think this is already taken into account here:

if(df.index is None or type(df.index) != pd.DatetimeIndex):
.

Agreed.