Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #90590
| Path | csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'tutorial': 0.03; 'from:addr:yahoo.co.uk': 0.04; 'beginner': 0.05; 'duplicate': 0.07; 'problem:': 0.07; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'rows': 0.09; 'rows,': 0.09; 'language.': 0.14; '72k': 0.16; 'before.': 0.16; 'columns': 0.16; 'csv': 0.16; 'mylist': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'language': 0.16; 'wrote:': 0.18; 'written': 0.21; 'help.': 0.21; 'header:User-Agent:1': 0.23; "i've": 0.25; 'compare': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; '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; 'lab': 0.33; 'could': 0.34; 'hundreds': 0.35; 'add': 0.35; 'really': 0.36; 'in.': 0.36; 'url:org': 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; 'received:org': 0.40; 'how': 0.40; 'even': 0.60; 'remove': 0.60; 'staff': 0.61; 'simple': 0.61; 'you.': 0.62; 'our': 0.64; 'accounts': 0.64; 'great': 0.65; 'charset:windows-1252': 0.65; 'life': 0.66; 'here': 0.66; 'dont': 0.67; 'hundred': 0.95 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
| Subject | Re: Looking for direction |
| Date | Thu, 14 May 2015 00:36:17 +0100 |
| References | <5553DD2E.2080600@pacbell.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | host-78-147-179-197.as13285.net |
| User-Agent | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
| In-Reply-To | <5553DD2E.2080600@pacbell.net> |
| 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.466.1431560188.12865.python-list@python.org> (permalink) |
| Lines | 39 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1431560188 news.xs4all.nl 2852 [2001:888:2000:d::a6]:56983 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:90590 |
Show key headers only | View raw
On 14/05/2015 00:24, 20/20 Lab wrote: > 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. Welcome :) > > 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. Check this out http://pandas.pydata.org/ -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Looking for direction Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-14 00:36 +0100
csiph-web