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

Filter by keyword #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions geo-app-api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ def list_to_df(values):
# print header
return df

def filter_value(df):

val = input('keyword: ') #this keyword will only be searched under the specified column!

filtered = (df[df.column_name==val]) #column_name needs to be stated
return filtered

# TODO move this to a module
# TODO write some test cases for this
Expand Down