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

Add [DataFrame, Series].filter() #212

Merged
merged 1 commit into from
May 20, 2020

Conversation

sethmlarson
Copy link
Contributor

@sethmlarson sethmlarson commented May 19, 2020

  • Adds support for .filter() on DataFrame and Series
  • Supports items, like, and regex for axis=columns on DataFrame.filter()
  • Supports items for axis=index on `Series.filter()
  • Renames Series.field_name to Series.es_field_name
  • Fixes a bug where setting DataFrame.columns to [] would still query all dataframe columns

Closes #198

Copy link
Contributor

@stevedodson stevedodson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - nice new features, making progress!

assert regex is not None
arg_name = "regex"

raise NotImplementedError(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, this assumes that _id is the current index. If the index is changed to a time series or other, we may support this.

@sethmlarson sethmlarson merged commit 6000ea7 into elastic:master May 20, 2020
@sethmlarson sethmlarson deleted the dataframe-filter branch May 20, 2020 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement DataFrame.filter()
2 participants