简体   繁体   中英

Excel data reshaping with Python

I have a particular spreadsheet which has point of sale data exported feom a sql database. Im trying to migrate to a new point of sale system and si i need to copy this data that i exported into a csv file into another csv file which has a different format, for example different columns thatvi have to rearrange the original data into. Im trto do this using python but im failing to find a way to automate this task. Does anyone have any ideas or any videos on a similar project

Pandas seems like the python tool for you.

Open up the first CSV file with Pandas as a DataFrame , apply any modifications you want, and save as a new CSV file. There is A LOT of documentation and support for Pandas, so I'm sure you can find tutorials on how to do any kind of data reshaping that you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM