In this post, we will see how to resolve Drop rows that contains the same value in pandas DataFrame
Question:I’m currently working on a data frame like the one below:
What I want to do is to drop the rows that only contain “NA” values. The result should be something like this:
I’ve tried using the pandas
drop()function but drops every row with at least one “NA” value. In that case, the row for Justin Timberlake would be dropped but that’s not what I need.
how='all'meaning If all values are
NA, drop that row or column. then set the
If you have better answer, please add a comment about this, thank you!