In a python script using the library pandas, I have a dataset of let's say 100 lines with a feature "X", containing 36 NaN values, and a list of size 36.
I want to replace all the 36 missing values of the column "X" by the 36 values I have in my list.
It's likely to be a dumb question, but I went through all the doc and couldn't find a way to do it.
Here's an example :
INPUT
Data: X Y
1 8
2 3
NaN 2
NaN 7
1 2
NaN 2
Filler
List: [8, 6, 3]
OUTPUT
Data: X Y
1 8
2 3
8 2
6 7
1 2
3 2
NaNvalues in the same column? How do you replace theNaNvalues with your list? Do you just do that sequentially, i.e. replace the firstNaNvalue with the fist value in the list, and so on?