Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(python): Fix column name output in example of DataFrame.map_rows #18227

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading