Skip to content

Commit 3aa2f35

Browse files
authored
correcting example in comparison with spreadsheets (#43377)
1 parent b8b7400 commit 3aa2f35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/source/getting_started/comparison/includes/nth_word.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ word by index. Note there are more powerful approaches should you need them.
55
66
firstlast = pd.DataFrame({"String": ["John Smith", "Jane Cook"]})
77
firstlast["First_Name"] = firstlast["String"].str.split(" ", expand=True)[0]
8-
firstlast["Last_Name"] = firstlast["String"].str.rsplit(" ", expand=True)[0]
8+
firstlast["Last_Name"] = firstlast["String"].str.rsplit(" ", expand=True)[1]
99
firstlast

0 commit comments

Comments
 (0)