[program-l] Re: Scripting or ot: Consolidating a large number of CSV files and Excel sheets

  • From: "Pranav Lal" <pranav.lal@xxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Sun, 16 Jun 2019 09:17:30 +0530

Hi,

Thanks for the book suggestion. I am currently using pandas to handle
multiple csv files.

Pranav

-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx <program-l-bounce@xxxxxxxxxxxxx> On
Behalf Of mhysnm1964@xxxxxxxxx
Sent: Saturday, June 15, 2019 9:35 AM
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: Scripting or ot: Consolidating a large number of
CSV files and Excel sheets

Pranav


Python has a module which can directly manipulate CSV and Excel
spreadsheets. Openpyxl is the excel module and csv is the CSV one. There is
a book out there with the title Automating the boring stuff with python or
something similar to this. This book provides some good examples with the
excel module.

-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx <program-l-bounce@xxxxxxxxxxxxx> On
Behalf Of Pranav Lal
Sent: Saturday, 15 June 2019 1:57 PM
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Scripting or ot: Consolidating a large number of CSV
files and Excel sheets

Hi all,

A friend has over 100 files which are a mix of Excel sheets and CSV files.
She needs to pull individual columns from the files into one huge file and
to generate reports and to run queries. The files have a similar layout but
she is not sure if the columns are in the same order. However, the column
names she has to extract are the same across the files.

How can this problem be resolved? One way is to write a script to merge the
files. However, are there other ways? We had thought Microsoft Access but
that has a 2GB file limit and I do not see a way to batch import files.

Pranav

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: