File size: 933 Bytes
526b228
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33


import pandas as pd


from pygrowup import Calculator
#from pygrowup import helpers


def calc(weight,height,age,gender):

    if age <= 24:
        calculator = Calculator(adjust_height_data=False, 
                                adjust_weight_scores=False,
                                include_cdc=False, 
                                logger_name='pygrowup',
                                log_level='INFO')

        wfa = calculator.wfa(weight,age,gender)
        lhfa = calculator.lhfa(height,age,gender)

    if age > 24:
        calculator = Calculator(adjust_height_data=False, 
                                adjust_weight_scores=False,
                                include_cdc=True, 
                                logger_name='pygrowup',
                                log_level='INFO')

        wfa = calculator.wfa(weight,age,gender)
        lhfa = calculator.lhfa(height,age,gender)

    return wfa,lhfa