human
number of non nan rows in a row.
assistant
Here is a Python function for a number of non-nan rows in a row

import pandas as pd

def number_of_non_nan_rows(df):
    """
    Return the number of non nan rows in a dataframe.
    """
    return df.notnull().sum()

# Enter the dataframe
df = pd.DataFrame({'a': [1, 2, 3, 4, 5], 'b': [1, 2, 3, 4, 5]})

# Calling the function
print((number_of_non_nan_rows(df)))

#Example Output
# a    5
# b    5
# dtype: int64

#Remember to inspect code for bugs.