"for each row, what is the fastest way to find the column holding nth element that is not nan?",(df.notnull().cumsum(axis=1) == 4).idxmax(axis=1)