小编Enj*_*joy的帖子

[featuretools]“EntitySet”对象没有属性“entity_from_dataframe”

我尝试按照 featuretools.com 的文档来学习 featuretools。

出现错误:AttributeError:“EntitySet”对象没有属性“entity_from_dataframe”

你可以帮帮我吗?谢谢。

代码:


import featuretools as ft

data = ft.demo.load_mock_customer()
transactions_df = data["transactions"].merge(data["sessions"]).merge(data["customers"])
transactions_df.sample(10)
products_df = data["products"]
products_df
es = ft.EntitySet(id="customer_data")
es = es.entity_from_dataframe(entity_id="transactions",
                              dataframe=transactions_df,
                             index="transaction_id",
                              time_index="transaction_time",
                              variable_types={"product_id": ft.variable_types.Categorical,
                                               "zip_code": ft.variable_types.ZIPCode})

es
Run Code Online (Sandbox Code Playgroud)

代码来源:https://docs.featuretools.com/en/v0.16.0/loading_data/using_entitysets.html#creating-entity-from-existing-table

python featuretools

6
推荐指数
2
解决办法
5171
查看次数

标签 统计

featuretools ×1

python ×1