Skip to content

Commit da27e5f

Browse files
committed
updated docstring for pandas.Series.str.split() method
1 parent 0a1da96 commit da27e5f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pandas/core/strings.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1122,9 +1122,12 @@ def str_split(arr, pat=None, n=None):
11221122
11231123
Notes
11241124
-----
1125-
- If n >= default splits, makes all splits
1126-
- If n < default splits, makes first n splits only
1127-
- Appends `None` for padding if ``expand=True``
1125+
The handling of the `n` keyword depends on the number of found splits:
1126+
1127+
- If found splits > `n`, make first `n` splits only
1128+
- If found splits <= `n`, make all splits
1129+
- If for a certain row the number of found splits < `n`,
1130+
append `None` for padding up to `n` if ``expand=True``
11281131
11291132
Examples
11301133
--------

0 commit comments

Comments
 (0)