我对Python很新颖,目前正致力于创建数据比较脚本。我有以下格式用于CSV文件比较的Python脚本
CSV1(源系统)
EMP_ID, EMP_NAME, EMP_LOCATION
1,Sam J, Houston
2,Man T, Houston
3,Sub D, Chicago
4,Saggie D, New York
CSV2(迁移/目标)
EMP_ID, EMP_NAME, EMP_LOCATION
1,Sam J, Houston£[email protected]£
2,Man T, Houston
3,Sub D, Chicago
4,Saggie D, New York^^^
两个文件我想比较结果是这样的此
EMP_ID_S, EMP_ID_T, EMP_ID_STATUS, EMP_NAME_S, EMP_NAME_T, EMP_NAME_STATUS, EMP_LOCATION_S, EMP_LOCATION_T, EMP_LOCATION_STATUS
1,1,Matched,Sam J, Sam J, Matched, Houston, Houston£[email protected]£, Not Matched
4,4,Matched,Saggie D, Saggie D, New York, New York^^^, Not Matched
我已经找到文件比较脚本,但找不到这种类型的东西。
你有什么试过?阅读关于python中的'csv'模块。 – void
向我们展示您到目前为止所尝试的内容,并请阅读以下内容:[我如何提出一个好问题?](https://stackoverflow.com/help/how-to-ask) – Clonkex