FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 3d3093f3 authored by Dr T. Mona's avatar Dr T. Mona
Browse files

Add filter function to allow filtering by list (with multiple countries)

parent 33d63894
No related branches found
No related tags found
No related merge requests found
......@@ -1079,11 +1079,17 @@ def process_in_job_survey(jobPath,status,config,component):
#TODO : for Kenya data, provide a coordinate-based filter
return
def filter_by_list(df,coln,values):
# CAUTION: This requires surveyor to provide the correct list of countries
df.drop(df.loc[~df[coln].isin(values)].index,inplace=True)
return
func_types = {
'add': add_column,
'remove' : remove_column,
'replace' : replace_column,
'filter' : filter_by_column
'filter' : filter_by_column,
'filter_by_list' : filter_by_list
}
# simple format alignment using edits on config
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment