load_data#
- class load_data(datafile, check_date=False, header='infer', calculate=True, **kwargs)[source]#
Load data for comparing to the model output, either from file or from a dataframe. Data is expected to be in wide format, with each row representing a year and columns for each variable by genotype/age/sex.
- Parameters:
datafile (str/df) – if a string, the name of the file to load (either Excel or CSV); if a dataframe, use directly
start_year (int) – first year with data available
kwargs (dict) – passed to pd.read_excel()
- Returns:
pandas dataframe of the loaded data
- Return type:
data (dataframe)