【发布时间】:2019-02-28 17:35:16
【问题描述】:
我正在尝试向实体添加一个新变量。
我正在尝试添加如下变量:
es['Product'].add_variable("inventory", data=inventory_series)
但是我收到了这个错误:
TypeError: 'Series' objects are mutable, thus they cannot be hashed
如果我将类型参数指定为 int,
es['Product'].add_variable("inventory", data=inventory_series)
我得到一个不同的错误:
--> 558 new_v = type(new_id, entity=self)
559 self.variables.append(new_v)
560
TypeError: 'entity' is an invalid keyword argument for this function
是否有另一种方法可以将新变量添加到实体?
谢谢,
【问题讨论】:
-
一个问题 - 在创建实体时,有什么理由不能将此变量添加到原始数据框中?我之所以这么问,是因为计划在下一版本的 featuretools 中删除此方法,以鼓励用户在创建实体集之前进行数据准备。
标签: python featuretools