old_contents: from pathlib import Path
  import pandas as pd
  from pandas_datapackage_reader import read_datapackage
  
  path = Path(__file__).parent
  
  
  _dtrm = read_datapackage(path, "magicc_dattype_regionmode_regions")
  
  region_cols = _dtrm.columns.to_series().apply(lambda x: x.startswith("Region"))
  
  dattype_regionmode_regions = _dtrm.loc[:, ~region_cols].copy()
  dattype_regionmode_regions["Regions"] = [
      [r for r in raw if not pd.isnull(r)]
      for raw in _dtrm.loc[:, region_cols].values.tolist()
  ]
  
  # TODO: put this text in docs/in data package with csv or something
  
  # ------- SCEN emissions code definitions -------
  # The definitions below define the emissions species which must be in SCEN (
  # i.e. scenario i.e. emissions projection input) files and which emissions
  # code they correspond to. The emissions code is used by MAGICC to
  # pre-allocate arrays.
  
  # ------- .prn species -------
  # .prn files are MAGICC6's ozone depleting species input file. They must
  # always contain the following species, regardless of whether they are
  # providing concentration or emissions timeseries.
  
  
  _emms_units = read_datapackage(path, "magicc_emisssions_units")
  
  scen_emms_code_1 = _emms_units[_emms_units["SCEN emms code 1"]]["MAGICC variable"].tolist()
  scen_emms_code_0 = _emms_units[_emms_units["SCEN emms code 0"]]["MAGICC variable"].tolist()
  prn_species = _emms_units[_emms_units["prn emms"]]["MAGICC variable"].tolist()
  
  
  _concs_units = read_datapackage(path, "magicc_concentrations_units")
  
new_contents: from pathlib import Path
  import pandas as pd
  from pandas_datapackage_reader import read_datapackage
  
  path = Path(__file__).parent
  
  
  _dtrm = read_datapackage(path, "magicc_dattype_regionmode_regions")
  
  region_cols = _dtrm.columns.to_series().apply(lambda x: x.startswith("Region"))
  
  dattype_regionmode_regions = _dtrm.loc[:, ~region_cols].copy()
  dattype_regionmode_regions["Regions"] = [
      [r for r in raw if not pd.isnull(r)]
      for raw in _dtrm.loc[:, region_cols].values.tolist()
  ]
  
  _emms_units = read_datapackage(path, "magicc_emisssions_units")
  
  scen_emms_code_1 = _emms_units[_emms_units["SCEN emms code 1"]]["MAGICC variable"].tolist()
  scen_emms_code_0 = _emms_units[_emms_units["SCEN emms code 0"]]["MAGICC variable"].tolist()
  prn_species = _emms_units[_emms_units["prn emms"]]["MAGICC variable"].tolist()
  
  
  _concs_units = read_datapackage(path, "magicc_concentrations_units")
  
subject: Delete now redundant explanatory text in definitions