xorbits.pandas.DataFrame.keys#

DataFrame.keys()[源代码]#

Get the ‘info axis’ (see Indexing for more).

This is index for Series, columns for DataFrame.

返回

Info axis.

返回类型

Index

实际案例

>>> d = pd.DataFrame(data={'A': [1, 2, 3], 'B': [0, 4, 8]},  
...                  index=['a', 'b', 'c'])
>>> d  
   A  B
a  1  0
b  2  4
c  3  8
>>> d.keys()  
Index(['A', 'B'], dtype='object')

This docstring was copied from pandas.core.frame.DataFrame.