Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
itholic committed Nov 19, 2019
1 parent ab27a0b commit 07d67b9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions databricks/koalas/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4281,10 +4281,9 @@ def tail(self, n=5):
7 whale
6 shark
"""
tmp_col = '__order__'
sdf = self._sdf.withColumn(tmp_col, F.monotonically_increasing_id())

return DataFrame(self._internal.copy(sdf=sdf.orderBy(tmp_col, ascending=False).limit(n)))
return DataFrame(self._internal.copy(
sdf=self._sdf.orderBy(F.monotonically_increasing_id(), ascending=False).limit(n)))

def pivot_table(self, values=None, index=None, columns=None,
aggfunc='mean', fill_value=None):
Expand Down

0 comments on commit 07d67b9

Please sign in to comment.