Columns must be same length as key

mail@pastecode.io avatar
unknown
python
2 years ago
450 B
682
Indexable
Never
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)