eds_scikit.biology.viz.aggregate
aggregate_measurement
aggregate_measurement(measurement: DataFrame, stats_only: bool, overall_only: bool, value_column: str, unit_column: str, category_columns = [], debug = False)
Aggregates measurement dataframe in three descriptive and synthetic dataframe : - measurement_stats - measurement_volumetry - measurement_distribution
Useful function before plotting.
PARAMETER | DESCRIPTION |
---|---|
measurement |
description
TYPE:
|
stats_only |
description
TYPE:
|
overall_only |
description
TYPE:
|
category_columns |
description, by default []
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
_type_
|
description |
Source code in eds_scikit/biology/viz/aggregate.py
17 18 19 20 21 22 23 24 25 26 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 99 100 101 102 103 104 105 |
|
add_mad_minmax
add_mad_minmax(measurement: DataFrame, category_cols: List[str], value_column: str = 'value_as_number', unit_column: str = 'unit_source_value') -> DataFrame
Add min_value, max_value column to measurement based on MAD criteria.
PARAMETER | DESCRIPTION |
---|---|
measurement |
measurement dataframe
TYPE:
|
category_cols |
measurement category columns to perform the groupby on when computing MAD
TYPE:
|
value_column |
measurement value column on which MAD will be computed
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
DataFrame
|
measurement dataframe with added columns min_value, max_value |
Source code in eds_scikit/biology/viz/aggregate.py
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 |
|