From bcd0c8b196a5a84aae976afc393174e18cf7a135 Mon Sep 17 00:00:00 2001 From: Digres Sawale Date: Fri, 3 Sep 2021 15:01:54 +0530 Subject: [PATCH] correcting example in comparison with spreadsheets --- doc/source/getting_started/comparison/includes/nth_word.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/getting_started/comparison/includes/nth_word.rst b/doc/source/getting_started/comparison/includes/nth_word.rst index 7af0285005d5b..20e2ec47a8c9d 100644 --- a/doc/source/getting_started/comparison/includes/nth_word.rst +++ b/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. firstlast = pd.DataFrame({"String": ["John Smith", "Jane Cook"]}) firstlast["First_Name"] = firstlast["String"].str.split(" ", expand=True)[0] - firstlast["Last_Name"] = firstlast["String"].str.rsplit(" ", expand=True)[0] + firstlast["Last_Name"] = firstlast["String"].str.rsplit(" ", expand=True)[1] firstlast