Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there a way to convert h2oframe to pandas dataframe

Tags:

python

pandas

h2o

I am able to convert dataframe to h2oframe but how can I convert back to a dataframe? If this is possible not can I convert it to a python list?

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)

like image 314
JaredDudley04 Avatar asked Dec 17 '19 00:12

JaredDudley04


1 Answers

There is an H2OFrame method called as_data_frame() but h2o.as_list() also works.

data_as_df = data.as_data_frame()
like image 173
Erin LeDell Avatar answered Oct 15 '22 12:10

Erin LeDell