Skip to content
Advertisement

How to delete a certain value in a cell in columns of csv using pandas

I need help with deleting “None” along with extra comma in language columns that have one or more language

Here is the existing csv:

JavaScript

Where f now looks like:

JavaScript

And the result should be like this:

JavaScript

There are also other columns that have only ‘None’ values in language column, so I can’t just use the replace function in excel, and there’s also a problem of extra “,” after doing that. So I may need help with a new way using pandas or something. Thanks in advance!

JavaScript

Advertisement

Answer

You could achieve it this way,

JavaScript

Or much better

JavaScript
Advertisement