Python Scrapy: How to get CSVItemExporter to write columns in a specific order

Viewed 10900

In Scrapy, I have my items specified in a certain order in items.py, & my spider has those items again in the same order. However, when I run the spider & save the results as a csv, the column order from the items.py or the spider is not maintained. How can I get the CSV to show columns in a specific order. Example code would be very appreciated.

Thanks.

2 Answers
Related