I've worked in the h2o R package for quite a while, now, but have recently had to move to the python package.
For the most part, an H2OFrame
is designed to work like a pandas DataFrame
object. However, there are several hurdles I haven't managed to get over... in Pandas, if I want to drop some rows:
df.drop([0,1,2], axis=0, inplace=True)
However, I cannot figure out how to do the same with an H2OFrame
:
frame.drop([0,1,2], axis=0)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-30-0eff75c48e35> in <module>()
----> frame.drop([0,1,2], axis=0)
TypeError: drop() got an unexpected keyword argument 'axis'
Their github source documents that the drop method is only for columns, so obviously the obvious way isn't working:
def drop(self, i):
"""Drop a column from the current H2OFrame.
Is there a way to drop rows from an H2OFrame
?