Skip to main content
edited tags
Link
Joshua
  • 43.6k
  • 9
  • 80
  • 153
Source Link
JJ1603
  • 636
  • 1
  • 8
  • 16

Python - re-ordering columns in a csv

I have a bunch of csv files with the same columns but in different order. We are trying to upload them with SQL*Plus but we need the columns with a fixed column arrange.

Example

required order: A B C D E F

csv file: A C D E B (sometimes a column is not in the csv because it is not available)

is it achievable with python? we are using Access+Macros to do it... but it is too time consuming

PS. Sorry if anyone get upset for my English skills.