def drop_nan_rows(df, nullr_c):
    """
    Input: Dataframe df and threshold nullr_c
    Returns: Dataframe df after droping those rows with more than nullr_c NaN values
    """
    nans_in_row = df.isnull().sum(axis=1)
    df_droped = df[nans_in_row <= nullr_c]
    original_n_rows = df.shape[0]
    new_n_rows = df_droped.shape[0]
    #print('{} rows dropped at {} threshold from the dataframe'.format(original_n_rows - new_n_rows, nullr_c))
    return df_droped