I have a DataFrame which contains a lot of NAN values, and it has around 100 columns and 100 rows which makes it difficult to have an overview of the rows, column pairs that are not NAN.
What is the best way to get a list of the rows, column pairs that are not NAN?
Let's assume for simplicity the following DataFrame:
import pandas as pd
import numpy as np
df = pd.DataFrame(data=
[[np.nan, 300, np.nan, 200,],
[400, 300, 100, 200],
[np.nan, np.nan, 100, np.nan],
[400, np.nan, 100, 200],
[400, 300, np.nan, 200]],
columns=["col1","col2","col3","col4"])
df
I would like to get a list with all the row, column pairs that are not NAN.