Skip to content

Commit

Permalink
Add Example
Browse files Browse the repository at this point in the history
  • Loading branch information
itholic committed Oct 19, 2019
1 parent 02e705d commit 3085759
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions databricks/koalas/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -7413,6 +7413,20 @@ def keys(self):
-------
Index
Columns of the DataFrame.
Examples
--------
>>> df = ks.DataFrame([[1, 2], [4, 5], [7, 8]],
... index=['cobra', 'viper', 'sidewinder'],
... columns=['max_speed', 'shield'])
>>> df
max_speed shield
cobra 1 2
viper 4 5
sidewinder 7 8
>>> df.keys()
Index(['max_speed', 'shield'], dtype='object')
"""
return self.columns

Expand Down

0 comments on commit 3085759

Please sign in to comment.