我正在尝试向实体中添加一个新变量。
我尝试添加一个变量,如下所示:
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是否有其他方法可以将新变量添加到实体中?
谢谢,
发布于 2018-09-25 19:07:58
您需要在add_variable中指定数据类型。我猜你已经尝试过这种方式了:
es['Product'].add_variable('inventory', data=inventory_series, type=int)并得到了这个错误:
实体:对于此函数,“entity”是无效的关键字参数
但类型必须是来自featuretools.variable_types的类型。如下所示:
es['Product'].add_variable(
'inventory',
data=inventory_series,
type=ft.variable_types.Ordinal
)https://stackoverflow.com/questions/52492335
复制相似问题