[kwlug-disc] Python

Steve Izma sizma at golden.net
Mon Jan 9 22:49:07 EST 2012

On Sun, Jan 08, 2012 at 11:41:28PM -0500, William Park wrote:
> Subject: Re: [kwlug-disc] Python
> "manipulating spreadsheet" caught my eyes.  What do yo mean?
> Are you parsing out XML file that Excel saves in?
> Or, are you parsing CSV format?

I'm referring to the need to manipulate data at a workplace
where the main tool people use for keeping track of data is a
spreadsheet. In my experience, for example, people are more
likely to use spreadsheets than databases for keeping track
of things like mailing addresses. I blame this abuse of tools
entirely on the refusal of most businesses and institutions to
properly train their staff.

But the advantage of this is that at least people are using a
structured format for their data. If they only used word
processors, it would be a lot harder to do something
programmatically (and thus analytically) with the contents.

So I've found that python works really well with structured data:
spreadsheets, XML/SGML, databases, filesystems. Python also has
an abundance of libraries (as pointed out in another message) for
handling various file formats, so I use these to actually get at
the data.

Another example is sales reports. Almost all the bookstores and
book wholesalers we deal with use spreadsheets to report sales to
us. But they all set up their columns in different ways (usually
they stick to their own layouts in subsequent reports, but not
always). At least everyone uses a book's ISBN to identify it, so
I use python to find the ISBNS, collate the related sales
data from various sources, and run various calculations on the
collection, then output the data either into another spreadsheet
or (more likely) to groff for a clean presentation. This is way
easier than trying to put a bunch of these spreadsheets together
into another one and then add the formulas necessary to get
summaries. Good grief! I'd have to use a mouse in that case!

	-- Steve

Steve Izma
Home: 35 Locust St., Kitchener N2H 1W6    p:519-745-1313
Work: Wilfrid Laurier University Press    p:519-884-0710 ext. 6125
E-mail: sizma at golden.net or steve at press.wlu.ca

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

More information about the kwlug-disc mailing list