You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix misleading add_column() usage example in docstring (#7648)
* Fix misleading add_column() usage example in docstring
This PR fixes the usage example in the Dataset.add_column() docstring, which previously implied that add_column() modifies the dataset in-place.
Why:
The method returns a new dataset with the additional column, and users must assign the result to a variable to preserve the change.
Fixes#7611
* Fix misleading docstring examples for select_columns, select, filter, shard, and flatten
Fix misleading docstring examples for select_columns, select, filter, shard, and flatten
- Updated usage examples to show correct behavior (methods return new datasets)
- Added inline comments to clarify that methods do not modify in-place
- Fixes follow-up from issue #7611 and @lhoestq’s review on PR #7648
* Apply suggestions from code review
---------
Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>
0 commit comments