def annualize(df, period_label='fqtr', period_val=4):  # Tested [Y]

    """
    Select only a subset of a DataFrame which has a particular value in a selected column.
    Used for selecting only 4th quarter observations from Compustat in Sauder's 2018 Capstone Project

    Args:
        df (pd.DataFrame): DataFrame containing observations to be subset.
        period_label (str or int): Default="fqtr". Label of a dataframe column to use for annualizing data
        period_val (str or int): Default=4. Value of the column to select by

    Returns:
        pd.DataFrame with only observations specified by period_val in period_label's column.
    """
    # Only select observations of firms final quarter of their fiscal year
    out = df[df[period_label] == period_val]
    return out