CodelistFilter
Bases: Filter
CodelistFilter is a class designed to filter a CodeTable based on a specified codelist.
Attributes:
Name | Type | Description |
---|---|---|
codelist |
Codelist
|
The codelist used for filtering the CodeTable. |
name |
str
|
The name of the filter. Defaults to the name of the codelist if not provided. |
use_code_type |
bool
|
A flag indicating whether to use the code type in the filtering process. Defaults to True. |
Source code in phenex/filters/codelist_filter.py
filter(table)
Filters the given table according to the rules of the Filter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
PhenexTable
|
The table to be filtered. |
required |
Returns:
Name | Type | Description |
---|---|---|
PhenexTable |
PhenexTable
|
The filtered table. The returned table has the exact same schema as the input table but has rows removed. |