DateRangeFilter
Bases: ValueFilter
DateRangeFilter is a ValueFilter applied to dates.
Attributes:
Name | Type | Description |
---|---|---|
min_date |
Optional[Union[date, str]]
|
The minimum date for the filter. If a string is provided, it will be converted to a date according to date_format. |
max_date |
Optional[Union[date, str]]
|
The maximum date for the filter. If a string is provided, it will be converted to a date according to date_format. |
column_name |
Optional[str]
|
The name of the column to apply the filter on. Defaults to EVENT_DATE, the default value for date columns in Phenex. |
date_format |
str
|
The format to use for parsing date strings. |
Source code in phenex/filters/date_range_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. |