Beaty
Beaty

Reputation: 31

tsFresh - The given column for the id is not present in the data

How do I solve the attribute error:

The given column for the id is not present in the data 

when the column_id is 'ID' in the pandas dataframe used as input for the tsfresh "extract_features" function?

Upvotes: 2

Views: 921

Answers (1)

jezrael
jezrael

Reputation: 862691

Problem is ID is level of MultiIndex, so need convert all levels to columns first by reset_index:

df = df.reset_index()

Upvotes: 3

Related Questions