Suppose I have the following dataframe:
col1 col2 col3 col4
0 8 2 nan nan
1 nan 2 15 nan
2 nan 2 15 4
3 3 2 15 nan
How can I filter the dataframe to show all rows which contain matching non-nan values? For example if I applied the following filter...
col1 col2 col3 col4
0 nan 2 15 nan
...the desired output should be:
col1 col2 col3 col4
0 nan 2 15 nan
1 nan 2 15 4
2 3 2 15 nan