tabsdata.tableframe.lazyframe.frame.TableFrame.limit#
- TableFrame.limit(n: int = 5) TableFrame [source]#
Return a TableFrame with the first n rows. This is equivalent to head.
- Parameters:
n – The number of rows to return.
Example:
>>> import tabsdata as td >>> >>> tf: td.TableFrame ... >>> ┌─────┬─────┐ │ a ┆ b │ │ --- ┆ --- │ │ str ┆ i64 │ ╞═════╪═════╡ │ A ┆ 1 │ │ X ┆ 10 │ │ C ┆ 3 │ │ D ┆ 5 │ │ M ┆ 9 │ └─────┴─────┘ >>> >>> tf.limit(2) >>> ┌─────┬─────┐ │ a ┆ b │ │ --- ┆ --- │ │ str ┆ i64 │ ╞═════╪═════╡ │ A ┆ 1 │ │ X ┆ 10 │ └─────┴─────┘