Skip to content

Commit

Permalink
docs(python): Fix column name output in example of `DataFrame.map_row…
Browse files Browse the repository at this point in the history
…s` (#18227)

Co-authored-by: Henry Harbeck <henry.harbeck@canstar.com.au>
  • Loading branch information
henryharbeck and Henry Harbeck authored Aug 16, 2024
1 parent 5e5506c commit b1b95a4
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -7003,17 +7003,17 @@ def map_rows(
Return a DataFrame with a single column by mapping each row to a scalar:
>>> df.map_rows(lambda t: (t[0] * 2 + t[1])) # doctest: +SKIP
>>> df.map_rows(lambda t: (t[0] * 2 + t[1]))
shape: (3, 1)
┌───────
apply
│ ---
│ i64
╞═══════
│ 1
│ 9
│ 14
└───────
┌─────┐
map
│ --- │
│ i64 │
╞═════╡
│ 1 │
│ 9 │
│ 14 │
└─────┘
In this case it is better to use the following native expression:
Expand Down

0 comments on commit b1b95a4

Please sign in to comment.