2018-03-07

# Import cars data

import pandas as pd

cars = pd.read_csv('cars.csv', index_col = 0)

# Code for loop that adds COUNTRY column

for lab,row in cars.iterrows() :

    cars.loc[lab,"COUNTRY"]=row["country"].upper()

# Print cars

print(cars)

你可能感兴趣的:(2018-03-07)