如何在 Python 中创建 H2O 数据框?

How to create a H2O data frame in Python?

[为清楚起见进行了编辑] 我想在 Python 中创建一个具有给定行数和列数的 H2O 数据框。我可以看到 there is a nice function in R。 Python里面有对应的吗? 准确地说,假设我想创建一个包含 10 行和 5 列的零的 H2O 数据框。我怎么做?这样的事情不起作用:

h2o.createFrame(rows = 10, cols = 5, value = 0)

有一个 h2o.H2OFrame() 函数接受多种类型的输入(列表、元组、字典、Pandas DataFrame、Scipy 稀疏矩阵)。有关 H2OFrame 构造函数 here, and general info about data manipulation in H2O here.

的更多信息

示例:

import h2o
hf = h2o.H2OFrame([[2,3],[4,5]])