Columns must be same length as key

 avatar
unknown
python
3 years ago
450 B
1033
Indexable
print(df.First.str.split(expand=True))  # gives me the following

                 0          1     2
Area Code
8074          John       None  None
9119          Jack       None  None
8075          John        "Da  Man"
91234      Stephen       None  None
298            NaN        NaN   NaN
123           Joan  "Danger",  Anne


# i want to keep only column 0, the instructor says to use

df.First = df.First.str.split(expand=True)

Editor is loading...