Apify Discord Mirror

Updated 5 months ago

Maintain order of column in Dataset from scrapy crawler.

At a glance

The community member is creating scrapers using Scrapy and Python, and they are required to conform to a specific output format. The issue they are facing is that the order of columns in the dataset automatically turns into alphabetical order, which is a tedious task to manually adjust. A community member has provided a potential solution, suggesting that the only way to change the order of columns is by selecting all the columns in the desired order and then exporting the dataset. This can be done using the console on the dataset detail or by using the API endpoint.

Useful resources
I am creating scraper's using scrapy, python. I have to conform to an output format. The order of columns in dataset automatically turn's into alphabetical. It is very tedious task to manually adjust the orders again.
Is there a way to maintain the orders of columns as that of output.
v
1 comment
the Hi , the only way to change the order of columns is by selecting all the columns in the desired order and then exporting it. You can do this both using the console on the dataset detail and using API endpoint: https://docs.apify.com/api/v2#/reference/datasets/dataset/get-items.
Add a reply
Sign up and join the conversation on Discord