-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Add row filtering operator #5900
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
Comments
Does this not work?
|
Sure that works, but the creation of the unnecessary intermediate variable |
there was a whole discussion about this in #2460 IIRC The problem with using the however, could potentially do something like this:
or
or could make so making |
Couldn't you use query as well? IMO lambdas in loc et al is bit of feature On Friday, January 10, 2014, jreback wrote:
Best, |
Hm nvm u would need the local On Sunday, January 12, 2014, Phillip Cloud wrote:
Best, |
Might it be possible with patsy to make a filter method that uses a formula string? pd.read_csv('imdb.txt')
.sort(columns='year')
.filter('year >1990')
.to_csv('filtered.csv') |
@naught101 Using strings to filter dataframes is already possible. The method is |
I suppose |
dupe of #11485 (which has more examples) |
This would allow chaining operations like:
For current alternatives see:
http://stackoverflow.com/questions/11869910/pandas-filter-rows-of-dataframe-with-operator-chaining
The text was updated successfully, but these errors were encountered: