I need a Python 3.6 script for CSV reformation
- or -
Post a project like this2229
€20(approx. $21)
- Posted:
- Proposals: 7
- Remote
- #1914433
- Completed
Description
Experience Level: Entry
I receive a CSV file with the structure you see in in the "sample data.csv" file and i want it to become like the "sameple data_edited.csv".
Initially the csv has one order with multiple items separated with columns.
What i want is to have one row = one order
So, if in the original CSV, someone has ordered 3 different "artikels" items, then after the reformation i want to have 3 rows for that person with one item per row. Also you will notice that for every initial row there are 21 possible items. in the output csv i want only those with values 1<.
Also i want the following functionality in the script
except IOError as exc:
if exc.errno != errno.EISDIR: # Do not fail if a directory is found, just ignore it.
raise # Propagate other kinds of IOError.
for name in files:
if not os.path.exists(archive_folder):
os.makedirs(archive_folder)
shutil.move(name,archive_folder)
shutil.copy2(name,archive_folder)
os.remove(name)
so after editing a file to move the original .csv inside an "Archives" sub folder.
Plus the script to run in any folder i might place it,
like ((
folder = sys.argv[1]
archive_folder = sys.argv[2]
))
Initially the csv has one order with multiple items separated with columns.
What i want is to have one row = one order
So, if in the original CSV, someone has ordered 3 different "artikels" items, then after the reformation i want to have 3 rows for that person with one item per row. Also you will notice that for every initial row there are 21 possible items. in the output csv i want only those with values 1<.
Also i want the following functionality in the script
except IOError as exc:
if exc.errno != errno.EISDIR: # Do not fail if a directory is found, just ignore it.
raise # Propagate other kinds of IOError.
for name in files:
if not os.path.exists(archive_folder):
os.makedirs(archive_folder)
shutil.move(name,archive_folder)
shutil.copy2(name,archive_folder)
os.remove(name)
so after editing a file to move the original .csv inside an "Archives" sub folder.
Plus the script to run in any folder i might place it,
like ((
folder = sys.argv[1]
archive_folder = sys.argv[2]
))
Theodor D.
100% (18)Projects Completed
18
Freelancers worked with
10
Projects awarded
53%
Last project
12 Feb 2020
Germany
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies