Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #90589

Looking for direction

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <lab@pacbell.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.024
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'python.': 0.02; 'tutorial': 0.03; 'beginner': 0.05; 'duplicate': 0.07; 'problem:': 0.07; 'rows': 0.09; 'rows,': 0.09; '72k': 0.16; 'before.': 0.16; 'columns': 0.16; 'csv': 0.16; 'mylist': 0.16; 'written': 0.21; 'help.': 0.21; 'header:User-Agent:1': 0.23; "i've": 0.25; 'compare': 0.26; 'point': 0.28; 'external': 0.29; 'said,': 0.30; "i'm": 0.30; 'easier': 0.31; 'file': 0.32; 'there.': 0.32; 'this.': 0.32; 'run': 0.32; 'worked': 0.33; 'could': 0.34; 'hundreds': 0.35; 'add': 0.35; 'really': 0.36; 'in.': 0.36; 'so,': 0.37; 'being': 0.38; 'thank': 0.38; 'to:addr:python-list': 0.38; 'short': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'how': 0.40; 'even': 0.60; 'remove': 0.60; 'received:67.195': 0.60; 'staff': 0.61; 'simple': 0.61; 'you.': 0.62; 'accounts': 0.64; 'great': 0.65; 'life': 0.66; 'here': 0.66; 'dont': 0.67; 'received:gq1.yahoo.com': 0.68; 'received:mail.gq1.yahoo.com': 0.68; 'received:bullet.mail.gq1.yahoo.com': 0.84; 'hundred': 0.95
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=pacbell.net; s=s2048; t=1431559470; bh=YEL8h20ZnWnbJbnrp1CfkUf/vBajAhc9XIzDyEvZPZU=; h=Date:From:To:Subject:From:Subject; b=IFIEPdMniZvOSxQZb9Um51L67Zm3bXw3eSkPCAKlSLGsr9jV0fVsCX6x0t6Jrs7VF73twGMZbWYw82Q9Q+HjJd0XMqn8l3VQEtoCehEo4LUWod1xd4x3aM24ybd7lpjklaBeii4foQ0HsMsZnzNC4mHLDRm7mz3EAGbKHtMeSXVUStgZXV92q4A3jNUpzJrpl0ygEWFPxe4g13tElmtd3+XLRKR5QeT4OunhV6FoEOLkegVfD++ABe1EoADwR0xhc9PGeTCldQEmL03uSGf8r5Ll8bvewME0BiacLUoMozHC8sEHa0Hj7L3ahD9ew0ffrYva8vjq9Jk4dD3vp4FNtA==
X-Yahoo-Newman-Id 672963.15212.bm@smtp118.sbc.mail.gq1.yahoo.com
X-Yahoo-Newman-Property ymail-3
X-YMail-OSG hd2x7fAVM1ngYzWuoFyH4WMXfdFyBeul3dD3l48OUzT9b9t f7BlKnwxpPCF9MULSLdZyBBaWfJ5DyBALI2OiQyHRVphKffQRmcdVm5GS940 3G5V5ww8zcJv8zLpQwvCdzU_1v2qjjsXLS4ZbSWzNduFiOtHJQ0L3FO0l0NC U9KCf7bdzv9IJapcqd_h6PVirhA0NwSP.m21ZZfImbh5vqJU4Rxym7JltUkS _WXzj_agPXslBgZhry.oBEVJVH41vzEf1MReH7PfKdHycnWfcn0m.Lf8VR_z 13dVkeN6uSigpH.V.HyMVx6AV2EyN_SSTCTQF8WJYnuyHXtwpd4fiulX3ie. E.hazZqLf7Q9kGdCYuV71mdNMp9EzpfuNubypYuEpVslZNMfy3Zh.4r6wPfZ GwyeShHmgxVJeLrNloiIaald92LiBtE4jWjfhSCvvDA3ZLKlr95BDHSJ4oWb zJ69HfE_FfP3y6m0Jsr0wQw7bLVunAY_0HS0.INe8ySXfH_9CUoDmZAOyrrp RrXmr.aIUUGgAAwiriRtWrk1E7_4BlVJ.awzdrfT3
X-Yahoo-SMTP pX5JzlCswBCHjFe3u2nDwDnAKSoAPmfgWieH5g--
Date Wed, 13 May 2015 16:24:30 -0700
From 20/20 Lab <lab@pacbell.net>
Organization 20/20 Optometric
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
MIME-Version 1.0
To python-list@python.org
Subject Looking for direction
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.465.1431559626.12865.python-list@python.org> (permalink)
Lines 26
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1431559626 news.xs4all.nl 2848 [2001:888:2000:d::a6]:53423
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:90589

Show key headers only | View raw


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 | NextNext in thread | Find similar | Unroll thread


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