I am using Pandas.
I have a dataset where I scraped linkedin for a company's employee data.
I am trying to slice a list in one column and make a new column with the slice but get this error.
This is what I tried.
- I filled in every nan with the word "blank" 2)I split the column into a list on spaces.
employees = employees.fillna("blank")
employees["jobDateRange"] = employees["jobDateRange"].str.split(" ")
The Result:
[Aug, 2013, –, Present]
Then I tried:
employees["job1month"] = employees["jobDateRange"][0]
And I get:
ValueError: Length of values (4) does not match length of index (179)
Can someone help me understand what I am doing wrong and what this error means? (Hopefully in plain English. I can't understand any of the other StackOverflow answers.