Merge CSVs in Python with different columns
问题 I have hundreds of large CSV files that I would like to merge into one. However, not all CSV files contain all columns. Therefore, I need to merge files based on column name, not column position. Just to be clear: in the merged CSV, values should be empty for a cell coming from a line which did not have the column of that cell. I cannot use the pandas module, because it makes me run out of memory. Is there a module that can do that, or some easy code? 回答1: The csv.DictReader and csv