original_docstring: Take a plant-column data frame and decompose it into plant-column data frames
      for each resource.
  
      :param pandas.DataFrame df: data frame, columns are plant id in grid.
      :param str/list/tuple/set resources: resource(s) to use for decomposition.
      :param powersimdata.input.grid.Grid grid: Grid instance.
      :return: (*dict*) -- keys are resources, values are plant-column data frames.
      
docstring: Take a plant-column data frame and decompose it into plant-column data frames
  for each resource.
docstring_tokens: Take a plant - column data frame and decompose it into plant - column data frames for each resource .
code: def decompose_plant_data_frame_into_resources(df, resources, grid):
      """Take a plant-column data frame and decompose it into plant-column data frames
      for each resource.
  
      :param pandas.DataFrame df: data frame, columns are plant id in grid.
      :param str/list/tuple/set resources: resource(s) to use for decomposition.
      :param powersimdata.input.grid.Grid grid: Grid instance.
      :return: (*dict*) -- keys are resources, values are plant-column data frames.
      """
      _check_data_frame(df, "PG")
      plant_id = set(df.columns)
      _check_plants_are_in_grid(plant_id, grid)
      resources = _check_resources_are_in_grid_and_format(resources, grid)
  
      df_resources = {
          r: df[get_plant_id_for_resources(r, grid) & plant_id].sort_index(axis=1)
          for r in resources
      }
      return df_resources
code_tokens: def decompose_plant_data_frame_into_resources ( df , resources , grid ) : _check_data_frame ( df , "PG" ) plant_id = set ( df . columns ) _check_plants_are_in_grid ( plant_id , grid ) resources = _check_resources_are_in_grid_and_format ( resources , grid ) df_resources = { r : df [ get_plant_id_for_resources ( r , grid ) & plant_id ] . sort_index ( axis = 1 ) for r in resources } return df_resources
short_docstring: Take a plant-column data frame and decompose it into plant-column data frames
  for each resource.
short_docstring_tokens: Take a plant - column data frame and decompose it into plant - column data frames for each resource .
comment: """Take a plant-column data frame and decompose it into plant-column data frames
      for each resource.
  
      :param pandas.DataFrame df: data frame, columns are plant id in grid.
      :param str/list/tuple/set resources: resource(s) to use for decomposition.
      :param powersimdata.input.grid.Grid grid: Grid instance.
      :return: (*dict*) -- keys are resources, values are plant-column data frames.
      """