I am working on a scan function that is continuously written to output.csv . If this is the first pass, it will write the first row with the header column to an empty file. For the next passes, it will append without a header.
My problem is that the order of the columns is mixed up. I would like them to follow the order I specified in df = pd.DataFrame .
import pandas as pd input = pd.read_csv(input.csv, delimiter=",") run = 0 def crawl(x): global run run = run + 1
source share