Combining car VIN data with vehicle weights#
A simple bit of data wrangling.
VIN data#
vin_df = pd.read_csv("data/vin_data.csv")
vin_df.head()
Weight data#
weights_df = pd.read_csv("data/weights.csv")
weights_df.head()
vins_weights = vin_df.merge(weights_df,
left_on=['Make', 'Model', 'ModelYear'],
right_on=['Make', 'Model', 'ModelYear'],
how='left')
vins_weights.head(5)
vins_weights = vins_weights.dropna(subset=['weight'])
vins_weights.shape
vins_weights.to_csv("data/vins_and_weights.csv", index=False)