2

Featuretools' dfs() method fails to run on my entity set after upgrading from v0.1.21 to v0.2.x and v0.3.0.

The error is raised when the Pandas backend tries to calculate the aggregate features _calculate_agg_features(). In particular:

--> 442 to_merge.reset_index(1, drop=True, inplace=True)
...
IndexError: Too many levels: Index has only 1 level, not 2

This is working fine in v0.1.x and the entity set hasn't changed after the upgrade. The entity set is composed of 7 entities and 6 relationships. Each entity (dataframe) is added via entity_from_dataframe.

J. Kinley
  • 21
  • 1
  • 3
  • Given this is more of potential bug, can you post this as an issue on github? https://github.com/Featuretools/featuretools/issues. When you do, please share runnable code that can reproduce this error and report the version numbers of installed python libraries by running `pip freeze`. Without that we won't be able to help. Thanks – Max Kanter Sep 12 '18 at 15:58
  • 1
    Thanks @MaxKanter, I've opened [#252](https://github.com/Featuretools/featuretools/issues/252) – J. Kinley Sep 13 '18 at 10:32
  • 1
    thanks. replied with a potential fix there – Max Kanter Sep 14 '18 at 13:34

1 Answers1

0

Use this:

df.columns = df.columns.droplevel(0)

where df is the name of dataframe. This may solve this problem.

Pika Supports Ukraine
  • 3,612
  • 10
  • 26
  • 42
Annu Roy
  • 1
  • 1