H2O Python - 如何获取变量类型,getTypes等价

H2O Python - how to get variable types, getTypes equivalent

R 中 getTypes 的 Python 等价物是什么? 我正在尝试从 H2O 数据框中提取每一列的变量类型(枚举、字符串、整数等)

此外,大体上有人可以向我发送 link 一些文档,其中列出了 Python 的数据框的所有属性和函数吗? 像。 df.nrow、df.shape等。我真的很难找到这么清楚的来源。

您可以在此处获取 H2O Python API(专门针对 H2OFrame 方法)的文档:http://docs.h2o.ai/h2o/latest-stable/h2o-py/docs/frame.html

如果你想在 H2O Python 中获取数据帧的类型,请执行 .types

frame = h2o.import_file("https://s3.amazonaws.com/h2o-public-test-data/smalldata/iris/iris.csv")
frame.types
{u'C3': u'real', u'C2': u'real', u'C1': u'real', u'C5': u'enum', u'C4': u'real'}