eds_scikit.biology.utils.prepare_measurement
prepare_measurement_table
prepare_measurement_table(data: Data, start_date: datetime = None, end_date: datetime = None, concept_sets: List[ConceptsSet] = None, get_all_terminologies = True, convert_units = False, compute_table = False) -> DataFrame
Returns filtered measurement table based on validity, date and concept_sets.
The output format is identical to data.measurement but adding following columns : - range_high_anomaly, range_low_anomaly - {terminology}_code based on concept_sets terminologies - concept_sets - normalized_units and normalized_values if convert_units==True
PARAMETER | DESCRIPTION |
---|---|
data |
Instantiated
TYPE:
|
start_date |
EXAMPLE:
TYPE:
|
end_date |
EXAMPLE:
TYPE:
|
concept_sets |
List of concepts-sets to select
TYPE:
|
get_all_terminologies |
If True, all terminologies from settings terminologies will be added, by default True
TYPE:
|
convert_units |
If True, convert units based on ConceptsSets Units object. Eager execution., by default False
TYPE:
|
compute_table |
If True, compute table then cache it. Useful to prevent spark issues, especially when running in notebooks.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
DataFrame
|
Preprocessed measurement dataframe |
Source code in eds_scikit/biology/utils/prepare_measurement.py
27 28 29 30 31 32 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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|