Objective:
Wine Quality Dataset:
Methods:
Full Technical Reference:
In [1]:
# Start and connect to a local H2O cluster
import h2o
h2o.init(nthreads = -1)
In [2]:
# Method 1 - Import data from a local CSV file
data_from_csv = h2o.import_file("winequality-white.csv")
data_from_csv.head(5)
Out[2]:
In [3]:
# Method 2 - Import data from the web
data_from_web = h2o.import_file("https://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-white.csv")
data_from_web.head(5)
Out[3]:
In [4]:
# Method 3 - Convert Python data frame into H2O data frame
## Import Wine Quality data using Pandas
import pandas as pd
wine_df = pd.read_csv('winequality-white.csv', sep = ';')
wine_df.head(5)
Out[4]:
In [5]:
## Convert Pandas data frame into H2O data frame
data_from_df = h2o.H2OFrame(wine_df)
data_from_df.head(5)
Out[5]: