Skip to content

Commit

Permalink
fix python client tail(). PUBDEV-1629
Browse files Browse the repository at this point in the history
  • Loading branch information
ericeckstrand committed Jul 6, 2015
1 parent 26fb8a1 commit a505588
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions h2o-py/h2o/frame.py
Expand Up @@ -307,12 +307,12 @@ def tail(self, rows=10, cols=200, **kwargs):
self._eager()
nrows = min(self.nrow(), rows)
ncols = min(self.ncol(), cols)
colnames = self.names()[0:ncols]
start_idx = max(self.nrow()-nrows,0)
tail = self[start_idx:(start_idx+nrows),:]
res = tail.as_data_frame(False)
colnames = res.pop(0)
print "Last {} rows and first {} columns: ".format(nrows,ncols)
h2o.H2ODisplay(res,["Row ID"]+colnames)
h2o.H2ODisplay(res,colnames)
return tail

def levels(self, col=None):
Expand Down

0 comments on commit a505588

Please sign in to comment.