我试图通过将其映射到国家CSV数据库districtname
来更正A.csv
中的B.csv
列
这是我的A.csv
"Series","No","districtname","PinCode"
"A","101","Mysuru","570010"
"A","103","D. K. ","574216"
"A","104","Bengaluru","560004"
"A","105","Bengaluru","560010"
"A","106","Doddaballapura","561203"
"A","107","Bengaluru","560002"
"A","109","Bengaluru","560050"
"A","110","Bengaluru","560076"
"A","111","Tumkur ","572112"
B.csv
PinCode,districtname
744112,South Andaman
744101,South Andaman
744103,South Andaman
744104,South Andaman
744201,North And Middle Andaman
744107,South Andaman
744302,Nicobar
744301,Nicobar
744202,North And Middle Andaman
...……
如何使用PinCode
中的A.csv
列作为查找B.csv
中提到的正式区名称的键
csvkit
命令行方法将很有帮助。
答案 0 :(得分:0)
是
csvjoin -I --left -c 4,1 fil1.csv file2.csv