def make_line_plot_df(df):
    """Wrangle data for line plots
    
    Arguments:
        df {pd.DataFrame} -- Raw life expectancy data frame
    
    Returns:
        pd.DataFrame -- In format wrangled for line plots
    """    
    
    df

    # Select needed columns
    df = df.loc[:, ["country", "year", "status", "life_expectancy", "gdp"]]
    

    ##add change in percentage columns and formating
    df['life_pct_change']=df.groupby('country').agg(
        {'life_expectancy':'pct_change'})
    df['gdp_pct_change']=df.groupby('country').agg(
        {'gdp':'pct_change'})
    
    def format_num(x, n=4):
        """
        Round number to n decimal place filtering None component

        Arguments:
        x (pd.DataFrame or pd.Series)
        """
        if x is not None:
            return round(x, n)
        
    df.loc[:, ['life_pct_change', 'gdp_pct_change']] = df.loc[:, ['life_pct_change', 'gdp_pct_change']].apply(format_num)
    df.loc[:,'gdp'] = df.loc[:, 'gdp'].apply(format_num, args=(1,))

    return df