2018-03-07

作者: Horus_eye | 来源:发表于2018-03-07 10:48 被阅读17次

# 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

    本文链接:https://www.haomeiwen.com/subject/hjfjfftx.html