如何在featuretools中显示每个原始特征?

huangapple go评论72阅读模式
英文:

How to show every primitives in featuretools

问题

我想列出Featuretools中的每个内置原语,而不跳过("...")。
我知道我可以使用list_primitives(),但我不知道如何显示所有内容。

import featuretools as ft

print(ft.primitives.list_primitives())  # 显示包含跳过的原语列表

我尝试过.set_option('display.max_rows', None),但没有起作用。

英文:

I want to list every built-in primitive in Featuretool without skip("...").
I know I can use list_primitives() but I don't know how to show everything.

import featuretools as ft

print(ft.primitives.list_primitives()) #show list of primitives with skip

I tried .set_option('display.max_rows', None) but it didn't work.

答案1

得分: 0

默认情况下,list_primitives() 函数只显示前 20 个基元,并使用 "..." 来显示其余的。您可以修改 pandas 选项以显示所有行而不截断。示例:

import pandas as pd
import featuretools as ft

pd.set_option('display.max_rows', None)  # 显示所有行
pd.set_option('display.max_colwidth', None)  # 显示完整的基元名称

primitives = ft.list_primitives()
primitives_df = pd.DataFrame(primitives)
print(primitives_df)
英文:

By default, list_primitives() function only displays the first 20 primitives and uses the "..." to display others. You can modify the pandas options to show all the rows without truncation. Example:

import pandas as pd
import featuretools as ft

pd.set_option('display.max_rows', None)  # show all rows
pd.set_option('display.max_colwidth', None)  # show full primitive name

primitives = ft.list_primitives()
primitives_df = pd.DataFrame(primitives)
print(primitives_df)

huangapple
  • 本文由 发表于 2023年4月4日 14:57:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/75926345.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定