I have a pandas dataframe like below: user
id is a column which can contain duplicates. C1,C2,C3
are also columns.
I want to delete only those rows which has duplicated user
column and have NaN for all values in C1,C2,C3
columns for those rows.
Expected output for this example: delete 1st row (user 1) as it has all NaN, but don't want to delete the row 3 (user 2) as it has only one instance (no duplicates). How can I accomplish it across all such rows?
user C1 C2 C3
1 NaN NaN NaN
1 Nan x y
2 NaN NaN Nan
3 a b c