Skip to content
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

expanding pp.uniq features #18

Open
GoogleCodeExporter opened this issue Mar 24, 2016 · 2 comments
Open

expanding pp.uniq features #18

GoogleCodeExporter opened this issue Mar 24, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

currently pp.uniq() can only eliminate duplicates as a whole.  But I think it 
would be cooler if you give it a (w[-1]) so that it would eliminate (or merge 
entries) based on a single column, rather than the whole line. 


Original issue reported on code.google.com by davidlee...@gmail.com on 26 Nov 2012 at 10:17

@GoogleCodeExporter
Copy link
Author

interesting idea...if you have the time, I can help you rewrite the uniq 
function to cover this.

Original comment by tobyro...@gmail.com on 1 Feb 2013 at 5:34

@GoogleCodeExporter
Copy link
Author

I've finally got a few cycles, so I was taking a look at the underpinnings.  
But after thinking about this, I realized that there is a workaround...

If in the case above you re.replace w[-1] you can remove it then pipe it to 
pp.uniq() which will then provide the uniq set.  If you need to merge entries, 
you can again pipe it to pp.oneline().  I think.

Its been so long now I forgot the original data set I used that warranted this 
feature.  If I come across it again I'll be sure to add it myself!

I also realized that to implement w[-1] into the pp class would be problematic 
no? Since that refers to a method elsewhere and power pyper does not recognize 
it.  

Original comment by davidlee...@gmail.com on 2 Apr 2014 at 7:02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant