【发布时间】:2018-04-07 02:26:05
【问题描述】:
我有一个数据框,其中包含 2 列 City_Type 和 Vehicle_Type 以及许多其他列。现在我在 Vehicle_Type 列中有一些缺失值,我需要根据 City_Type 使用 Vehicle_Type 的模式进行估算。 首先,我需要编写一个 python 程序来获得以下输出。然后我需要根据以下输出填充 Vehicle_Type 字段中的缺失值。
City_Type Vehicle_Type
Tier1 Sedans
Tier2 Hatchback
Tier3 SUV
【问题讨论】:
标签: python pandas scipy analytics pandas-groupby