您的第一个内连接
您的任务是找出芝加哥出租车中最常用的燃料类型。为完成分析,您需要在 vid 列上将 taxi_owners 和 taxi_veh 两张表合并。然后,使用合并后的表配合 .value_counts() 方法,找出最常见的 fuel_type。
由于本课程始终使用 pandas,在每个练习中该库都会预先以 pd 名称加载。此外,taxi_owners 和 taxi_veh 这两个 DataFrame 也已为您加载。
本练习是课程的一部分
使用 pandas 连接数据
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Merge the taxi_owners and taxi_veh tables
taxi_own_veh = taxi_owners.____
# Print the column names of the taxi_own_veh
print(taxi_own_veh.columns)