有没有办法将 h2oframe 转换为 pandas 数据帧

is there a way to convert h2oframe to pandas dataframe

我可以将数据帧转换为 h2oframe,但如何转换回数据帧?如果可能的话,我可以将它转换为 python 列表吗?

import pandas as pd
import h2o
df = pd.DataFrame({'1': [2838, 3222, 4576, 5665, 5998], '2': [1123, 3228, 3587, 5678, 6431]})
data = h2o.H2OFrame(df)

将 h2o 框架转换为列表

data_as_list = h2o.as_list(data, use_pandas=False)

将 h2o 帧转换为 pandas DataFrame。 (默认use_pandas=True)

data_as_df = h2o.as_list(data)

有一个名为 as_data_frame() 的 H2OFrame 方法,但 h2o.as_list() 也可以。

data_as_df = data.as_data_frame()