0
我需要创建一个excel表,比较两个样本表,其中一个包含序列号和其他信息。第二张表包含保修日期。例如, 来源1页包含的数据如下python比较两个excel表并追加正确的记录
Model Serial Location
Dell 1234 A
Thoshiba 2345 B
Apple 3456 C
Cisco 4567 D
Sun 5678 E
源2包含数据如下
Serial Warranty Status
2345 1/1/2010
4567 2/2/2012
1112 3/2/2015
,其结果应该是
Model Serial Location Warranty Status
Dell 1234 A Not Found
Thoshiba 2345 B 1/1/2010
Apple 3456 C Not Found
Cisco 4567 D 2/2/2012
Sun 5678 E Not Found
Not Found 1112 Not Found 3/2/2015
我已经发现了一些示例脚本,但我的情况包含:
- 大数据量,需要很长时间才能运行
- 序列号在source1和source2文件中的顺序并不相同
- 有一些情况存在序列号存在于源文件
请给我一些建议和最佳算法来做到这一点更快。
为此得到一些错误。 http://stackoverflow.com/questions/38347985/python-pandas-merging-excel-sheets-not-working – theG