def select_countries(df, 
                     select_years=[str(x) for x in range(2005, 2019)],
                     threshold=12, values='value'):
    """
    Extract a list of countries that has sufficient data for the selected years.

    Args:
        df: (DataFrame) Created by "extract_data".
        select_years: (list) Years (str) to be included in analysis.
        threshold: (int) Threshold for dropping rows with missing values as
                   implemented in the pandas .dropna() method.
        values: (str or list) Name of column that will be used for values in the
                pandas .pivot() method.
    Returns:
        pandas Series.
    """
    # Filter for only relevant years
    df = df[df.year.isin(select_years)]

    # Find countries with sufficient data for select years
    df['missing'] = df['value'].isna()
    country_missing = df.groupby('country')['missing'].sum()
    countries = country_missing[country_missing <= 12].index.tolist()

    return countries