eds_scikit.biology.utils.process_measurement
filter_measurement_valid
filter_measurement_valid(measurement: DataFrame) -> DataFrame
Filter valid observations based on the row_status_source_value
column
PARAMETER | DESCRIPTION |
---|---|
measurement |
DataFrame to filter
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
DataFrame
|
DataFrame with valid observations only |
Source code in eds_scikit/biology/utils/process_measurement.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
filter_measurement_by_date
filter_measurement_by_date(measurement: DataFrame, start_date: datetime = None, end_date: datetime = None) -> DataFrame
Filter observations that are inside the selected time window
PARAMETER | DESCRIPTION |
---|---|
measurement |
DataFrame to filter
TYPE:
|
start_date |
EXAMPLE:
TYPE:
|
end_date |
EXAMPLE:
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
DataFrame
|
DataFrame with observations inside the selected time window only |
Source code in eds_scikit/biology/utils/process_measurement.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
tag_measurement_anomaly
tag_measurement_anomaly(measurement: DataFrame) -> DataFrame
PARAMETER | DESCRIPTION |
---|---|
measurement |
DataFrame to filter
TYPE:
|
start_date |
EXAMPLE:
TYPE:
|
end_date |
EXAMPLE:
TYPE:
|
Source code in eds_scikit/biology/utils/process_measurement.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
convert_measurement_units
convert_measurement_units(measurement: DataFrame, concepts_sets: List[ConceptsSet]) -> DataFrame
Add value_as_number_normalized, unit_source_value_normalized and factor columns to measurement dataframe based on concepts_sets and units.
PARAMETER | DESCRIPTION |
---|---|
measurement |
TYPE:
|
concepts_sets |
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
DataFrame
|
Measurement with added columns value_as_number_normalized, unit_source_value_normalized and factor. |
Source code in eds_scikit/biology/utils/process_measurement.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
|
get_conversion_table
get_conversion_table(measurement: DataFrame, concepts_sets: List[ConceptsSet]) -> DataFrame
Given measurement dataframe and list of concepts_sets output conversion table to be merged with measurement.
PARAMETER | DESCRIPTION |
---|---|
measurement |
TYPE:
|
concepts_sets |
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
DataFrame
|
Conversion table to be merged with measurement |
Source code in eds_scikit/biology/utils/process_measurement.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
|