def find_nonNAcolumns(df1, df2):
    """This function finds the columns that both dataframes
    do not have any NaN values in. Inputs are the two
    dataframes (df1, df2). This function returns the
    non-NA columns as a list."""
    nonnacols_df1 = []
    # initializes empty list to store the non-NA column names
    # in for df1
    for i in range(len(df1.columns)):
        # looping over the columns in df1
        col = list(df1)[i]
        if df1[col].isnull().sum() == 0:
            # this is counting the instances of "NA" in the column
            # (df1[col]) and appending them to the nonnacols_df1
            # list only if the sum is 0.
            nonnacols_df1.append(col)

    nonnacols_df2 = []
    # initializes empty list to store the non-NA column names
    # in for df2
    for i in range(len(df2.columns)):
        # looping over the columns in df2
        col = list(df2)[i]
        if df2[col].isnull().sum() == 0:
            # this is counting the instances of "NA" in the column
            # (df2[col]) and appending them to teh nonnacols_df2
            # list only if the sum is 0.
            nonnacols_df2.append(col)
    # then we find the intersection between the two lists,
    # nonnacols_df1 and nonnacols_df2, which gives the column
    # names where both df1 and df2 have no NA values.
    nonnacols = set(nonnacols_df1).intersection(set(nonnacols_df2))
    # returns nonnacols as a list
    return nonnacols