Get the first n
rows.
Description
Get the first n
rows.
Usage
<DataFrame>$head(n = 5L)
DataFrame_limit(n = 5L)
Arguments
n
|
Number of rows to return. If a negative value is passed, return all rows
except the last abs(n) .
|
Details
$limit()
is an alias for
$head()
.
Value
A DataFrame
Examples
#> shape: (3, 3)
#> ┌─────┬─────┬─────┐
#> │ foo ┆ bar ┆ ham │
#> │ --- ┆ --- ┆ --- │
#> │ i32 ┆ i32 ┆ str │
#> ╞═════╪═════╪═════╡
#> │ 1 ┆ 6 ┆ a │
#> │ 2 ┆ 7 ┆ b │
#> │ 3 ┆ 8 ┆ c │
#> └─────┴─────┴─────┘
#> shape: (2, 3)
#> ┌─────┬─────┬─────┐
#> │ foo ┆ bar ┆ ham │
#> │ --- ┆ --- ┆ --- │
#> │ i32 ┆ i32 ┆ str │
#> ╞═════╪═════╪═════╡
#> │ 1 ┆ 6 ┆ a │
#> │ 2 ┆ 7 ┆ b │
#> └─────┴─────┴─────┘