Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #90589
| Date | 2015-05-13 16:24 -0700 |
|---|---|
| From | 20/20 Lab <lab@pacbell.net> |
| Organization | 20/20 Optometric |
| Subject | Looking for direction |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.465.1431559626.12865.python-list@python.org> (permalink) |
I'm a beginner to python. Reading here and there. Written a couple of
short and simple programs to make life easier around the office.
That being said, I'm not even sure what I need to ask for. I've never
worked with external data before.
I have a LARGE csv file that I need to process. 110+ columns, 72k
rows. I managed to write enough to reduce it to a few hundred rows, and
the five columns I'm interested in.
Now is were I have my problem:
myList = [ [123, "XXX", "Item", "Qty", "Noise"],
[72976, "YYY", "Item", "Qty", "Noise"],
[123, "XXX" "ItemTypo", "Qty", "Noise"] ]
Basically, I need to check for rows with duplicate accounts row[0] and
staff (row[1]), and if so, remove that row, and add it's Qty to the
original row. I really dont have a clue how to go about this. The
number of rows change based on which run it is, so I couldnt even get
away with using hundreds of compare loops.
If someone could point me to some documentation on the functions I would
need, or a tutorial it would be a great help.
Thank you.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Looking for direction 20/20 Lab <lab@pacbell.net> - 2015-05-13 16:24 -0700
Re: Looking for direction Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-14 11:23 +1000
Re: Looking for direction 20/20 Lab <lab@pacbell.net> - 2015-05-14 09:57 -0700
Re: Looking for direction Tim Chase <python.list@tim.thechases.com> - 2015-05-14 12:17 -0500
Re: Looking for direction Ziqi Xiong <xiongziqi84@gmail.com> - 2015-05-15 03:31 +0000
Re: Looking for direction darnold <darnold992000@yahoo.com> - 2015-05-20 05:50 -0700
Re: Looking for direction 20/20 Lab <lab@pacbell.net> - 2015-05-20 14:18 -0700
csiph-web