-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add addfields basic transformation #417
Conversation
Hi @mjumbewu, this is really nice. I'd be happy to add this new function. My only thought is that it would be more straightforward to just use tuples, rather than have the |
@alimanfoo No problem. Also noting that the syntax |
Sounds good to me.
…On Sun, Mar 19, 2017 at 10:54 PM, Mjumbe Poe ***@***.***> wrote:
@alimanfoo <https://github.com/alimanfoo> No problem. Also noting that
the syntax def addfields(table, *fields, missing=None) breaks python2.
I'm thinking of just changing it to def addfields(table, fields,
missing=None), where fields is a collection of tuples, rather than moving
the expansion to the end or just using *args, **kwargs.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#417 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAq8QospRZLuBAMHW4csB6PE76qFivd3ks5rnbIXgaJpZM4Mh3Tl>
.
--
Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health <http://cggh.org>
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford
OX3 7BN
United Kingdom
Email: alimanfoo@googlemail.com
Web: http://purl.org/net/aliman
Twitter: https://twitter.com/alimanfoo
Tel: +44 (0)1865 287721
|
- Add multiple fields to a table at once - Adding multiple fields at once saves the transformations from having to copy each row to a new view more times than it needs to
Going ahead with merge, happy to revisit if any comments. |
I've found it handy a few times to be able to add a bunch of fields in one go. Adding multiple fields at once saves the transformations from having to copy each row to a new view more times than it needs to.
This patch uses an implementation that I put together, closely mirroring
addfield
. Thoughts?