improved handling for apply_as_df, also added an na.omit line to character_table