def merge_pixel_values(meta_df, l_28_28_df, rgb_28_28_df):
    """ Merges metadata dataframe with RGB and luminance pixel values dfs

    Parameters
    ----------
    meta_df
        metadata dataframe
    
    l_28_28_df
        28 X 28 luminance dataframe

    rgb_28_28_df
        28 X 28 RGB dataframe

    Returns
    -------
    pandas.core.frame.DataFrame
        Merged dataframe

    """
    
    # Add suffix to names to ensure they are unique after merge
    
    l_28_28_df.columns = [str(col) + '_l_28_28'
                            for col in l_28_28_df.columns]
    rgb_28_28_df.columns = [str(col) + '_rgb_28_28'
                            for col in rgb_28_28_df.columns]
    
    # Merge first with luminance then rgb using append with transpose
    # Transpose makes sure axis direction is correct
    
    merged_df_l = (l_28_28_df.T.append(meta_df.T, sort=False)).T
    merged_df_l_rgb = (rgb_28_28_df.T.append(merged_df_l.T, sort=False)).T
    
    return(merged_df_l_rgb)