快捷鍵

torcharrow.Column.head

Column.head(n=5)

返回前 n 列。

參數:

n (int) – 要返回的列數。

另請參閱

icolumn.tail

返回最後 n 列。

範例

>>> import torcharrow as ta
>>> df = ta.dataframe({'a': list(range(7)),
>>>             'b': list(reversed(range(7))),
>>>             'c': list(range(7))
>>>            })
>>> df.head(2)
  index    a    b    c    d
-------  ---  ---  ---  ---
      0    0    6    0   99
      1    1    5    1  100
dtype: Struct([Field('a', int64), Field('b', int64), Field('c', int64), Field('d', int64)]), count: 2, null_count: 0

文件

存取 PyTorch 的完整開發者文件

檢視文件

教學課程

取得適用於初學者和進階開發者的深入教學課程

檢視教學課程

資源

尋找開發資源並獲得問題解答

檢視資源