pip install h2o import h2o★Requires a Java runtime for the backend. The pip package bundles the H2O jar.h2o.init()★Starts (or connects to) the H2O cluster.h2o.init(nthreads=-1, max_mem_size="8G")to size it; connect to a remote one withip=/port=.h2o.cluster().show_status() · h2o.no_progress()Inspect the cluster; silence progress bars in scripts.
df = h2o.import_file("data.csv")★Loads on the cluster (fast, out-of-core), not into Python memory. Also from S3/HDFS URLs.df = h2o.H2OFrame(pandas_df) · df.as_data_frame() # back to pandas★Convert to/from pandas.as_data_frame()pulls the (whole) frame into local memory — fine for results, not huge data.df.shape · df.columns · df.head() · df.describe() · df.types★pandas-like introspection. Indexing:df["col"],df[df["age"] > 30].
df["target"] = df["target"].asfactor()★Critical: for classification, cast the target to a factor (categorical). A numeric target trains regression — a silent, common mistake.train, valid, test = df.split_frame([0.7, 0.15], seed=1)★Split ratios (the remainder is the last frame). Splits happen in the cluster.y = "target"; x = [c for c in df.columns if c != y]★H2O trains by column names:y= target name,x= list of predictor names.df.impute(...) · df["c"].asnumeric() · df.na_omit()In-cluster transforms. Note: tree models handle NAs natively — imputation often unnecessary.