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


Groups > comp.lang.python > #75396

Re: speed up pandas calculation

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!rt.uk.eu.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 <skip.montanaro@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.057
X-Spam-Evidence '*H*': 0.89; '*S*': 0.00; 'toss': 0.09; 'cc:addr :python-list': 0.11; '(now': 0.16; 'columns': 0.16; 'effect.': 0.16; 'bit': 0.19; 'cc:addr:python.org': 0.22; 'skip': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'sets': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'could': 0.34; 'something': 0.35; 'received:google.com': 0.35; 'issue': 0.38; 'complete': 0.62; 'real': 0.63; 'more': 0.64; 'responses': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=rOOSLZ3kaNJCl45hcNHNwIRqop52fOPRLvLFeQcmmuk=; b=AbUPL1ZZMUY+1sh4/+g2bA69YiQmds/+wnk4tkv0qd3mGldxUDNqPkVCyRXSopT4PQ VOwxO/IDLqr55TS7EageHNmOVqir/JG0Vu9qnsSJGVm3CpEKEOVgCkWFcFXNsFVjKEHo 4EOAJTKQavpMMcjX3+gH56z+Xal517v0CXQt1QhOORIg6wUMWUPucafk0EZdJ7fOgYlN osOP6QWbXv/wAxbHl1evm/ZWpxbFjWegpyVs1xRLb4qRwxNRADPIUm+BNIDt9AO9HuG0 Xf1sQZrmpVYDvysS/lohUW9gUehPzJEpH1r8U46ZFEQ1qhZCsOligtS4ASjJXSPI14Bk faHQ==
MIME-Version 1.0
X-Received by 10.42.82.6 with SMTP id b6mr10417051icl.51.1406773490565; Wed, 30 Jul 2014 19:24:50 -0700 (PDT)
In-Reply-To <CALyJZZUQiw7W-EbOqDYF0wfuBJ5pTexP00FEndsOxNy5+MQrnA@mail.gmail.com>
References <CALyJZZXMmSk8L7+P7erQSp2W4EpkbxiXmJkY-+5svfK5C3Z0kw@mail.gmail.com> <CANc-5UzCLT8ZPF2PCDMQyOqr0gqrDjFGnsRAoFBfGVmCh5-0jg@mail.gmail.com> <CALyJZZWtCwRqL_QZJEe415o1_L_g6A4ZhrFJe6y3z1_jysfSxA@mail.gmail.com> <CALyJZZUQiw7W-EbOqDYF0wfuBJ5pTexP00FEndsOxNy5+MQrnA@mail.gmail.com>
Date Wed, 30 Jul 2014 21:24:50 -0500
Subject Re: speed up pandas calculation
From Skip Montanaro <skip.montanaro@gmail.com>
To Vincent Davis <vincent@vincentdavis.net>
Content-Type text/plain; charset=UTF-8
Cc Python <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.12451.1406773498.18130.python-list@python.org> (permalink)
Lines 11
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1406773498 news.xs4all.nl 2927 [2001:888:2000:d::a6]:55860
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:75396

Show key headers only | View raw


(Now that I'm on a real keyboard, more complete responses are a bit easier.)

Regarding the issue of missing columns from keep_col, you could create
sets of what you have and what you want, and toss the rest:

toss_these = list(set(df.columns) - set(keep_col))
del df[toss_these]

Or something to that effect.

Skip

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: speed up pandas calculation Skip Montanaro <skip.montanaro@gmail.com> - 2014-07-30 21:24 -0500

csiph-web