Suppose I have a DataFrame that has a column Name
which comprises first and last names. I want to split it into two different columns FirstName
and LastName
.
Name:
0 Kashaf Khan
1 Hassan Ahmed
2 Sidra Rashid
3 Alina Rizwan
After splitting into two columns, it looks like below:
FirstName: LastName:
0 Kashaf Khan
1 Hassan Ahmed
2 Sidra Rashid
3 Alina Rizwan
I don’t know how to split it. Can someone share methods for splitting columns?