We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8b7400 commit 3aa2f35Copy full SHA for 3aa2f35
doc/source/getting_started/comparison/includes/nth_word.rst
@@ -5,5 +5,5 @@ word by index. Note there are more powerful approaches should you need them.
5
6
firstlast = pd.DataFrame({"String": ["John Smith", "Jane Cook"]})
7
firstlast["First_Name"] = firstlast["String"].str.split(" ", expand=True)[0]
8
- firstlast["Last_Name"] = firstlast["String"].str.rsplit(" ", expand=True)[0]
+ firstlast["Last_Name"] = firstlast["String"].str.rsplit(" ", expand=True)[1]
9
firstlast
0 commit comments