I want to replace the values of the rows of a specific column with one name, but I want to skip the rows that have no value.
So only the row with text in it should get a different name.
I tried this: df.loc[:, 'Groenlinks'] = 'gl' But with this all the rows change to 'gl'. I'm not sure how I can only replace the names of different rows with one word without typing all the words it should replace.
I want it to look like this:
VVD PVV Groenlinks
vvd gl
pvv
vvd
vvd gl
vvd pvv
