H2O is an Open Source, Distributed, Fast & Scalable Machine Learning Platform: Deep Learning, Gradient Boosting (GBM) & XGBoost, Random Forest, Generalized Linear Modeling (GLM with Elastic Net), K-Means, PCA, Generalized Additive Models (GAM), RuleFit, Support Vector Machine (SVM), Stacked Ensembles, Automatic Machine Learning (AutoML), etc.
There is an element of pilot error on my part, BUT... I seem to have damaged a H2O DataFrame from my error. When I correct the problem, the DF isn't damaged, but it doesn't seem to do the right thing... It should be more robust to dumb errors….
The bad line that provokes the problem is:
{code:python}df[df['e'] == 'a'] = 'c'{code}
BUT I think if I use the correct code, I don't get the right answer
{code:python}df[df['e'] == 'a']['e'] = 'c' # should only change Column 'e'
print(df) # but it doesn't
e n
a 1 # THIS LINE SHOULD BE c 1
b 2{code}
{code:python}import h2o
h2o.init()
ERROR = True # Change to False to avoid error
if ERROR:
data = {
'e' : ['a', 'b'],
'n' : [1,2] # creates a DF with two columns of different types
}
else:
data = {
'e' : ['a', 'b'],
There is an element of pilot error on my part, BUT... I seem to have damaged a H2O DataFrame from my error. When I correct the problem, the DF isn't damaged, but it doesn't seem to do the right thing... It should be more robust to dumb errors….
The bad line that provokes the problem is:
{code:python}df[df['e'] == 'a'] = 'c'{code}
BUT I think if I use the correct code, I don't get the right answer
{code:python}df[df['e'] == 'a']['e'] = 'c' # should only change Column 'e' print(df) # but it doesn't
e n a 1 # THIS LINE SHOULD BE c 1 b 2{code}
{code:python}import h2o h2o.init() ERROR = True # Change to False to avoid error
if ERROR: data = { 'e' : ['a', 'b'], 'n' : [1,2] # creates a DF with two columns of different types } else: data = { 'e' : ['a', 'b'],
'n' : [1,2]
df = h2o.H2OFrame(data) print(df) print(df.types) print(df[df['e'] == 'a']['e'])
df[df['e'] == 'a']['e'] = 'c'
df[df['e'] == 'a'] = 'c' # Programming error: should be df[df['e'] == 'a']['e'] = 'c'
print(df) # Trying to display the DF causes an error
Parse progress: |█████████████████████████████████████████████████████████| 100% e n a 1 b 2
{'e': 'string', 'n': 'int'} e a
H2OResponseError Traceback (most recent call last)