text_html_output_1.png
import pandas as pd

import pandas as pd
apple_mobility_df = pd.read_csv('../input/apple-mobility-trends-updated-daily/Apple_Mobility_2020-04-13.csv')
apple_mobility_df.drop('Unnamed: 0', axis=1, inplace=True)

geo_mask = apple_mobility_df['geo_type'] == 'country/region'
mobility_countries = apple_mobility_df[geo_mask]
mobility_cities = apple_mobility_df[~geo_mask]

def get_trans_count(df):
    name = df['geo_type'].iloc[0]
    return df['transportation_type'].value_counts().rename(str(name))
transport_types_count = pd.concat([get_trans_count(mobility_countries), get_trans_count(mobility_cities)], axis=1, sort=False)
transport_types_count