for example:
index1 dog 32 height
index2 cat 20 height weight
In this example, the second row has 5 columns so how to find the row which maximum columns(cells)?
If df
data frame has multiple rows having the same maximum value of not empty columns then use:
df[df.notnull().sum(1)==df.notnull().sum(1).max()]
This selects rows which have number of not empty columns equal to maximum of it across entire data set.