parameters: (
          self,
          columns: list[list[str | int | None]],
          usecols_key: list[str | int | None],
          num_original_columns: int,
      )
return_statement: return columns
docstring: Sets self._col_indices
  
          usecols_key is used if there are string usecols.
docstring_summary: Sets self._col_indices
docstring_tokens: Sets self . _col_indices
function: def _handle_usecols(
          self,
          columns: list[list[str | int | None]],
          usecols_key: list[str | int | None],
          num_original_columns: int,
      ):
          """
          Sets self._col_indices
  
          usecols_key is used if there are string usecols.
          """
          if self.usecols is not None:
              if callable(self.usecols):
                  col_indices = self._evaluate_usecols(self.usecols, usecols_key)
              elif any(isinstance(u, str) for u in self.usecols):
                  if len(columns) > 1:
                      raise ValueError(
                          "If using multiple headers, usecols must be integers."
                      )
                  col_indices = []
  
                  for col in self.usecols:
                      if isinstance(col, str):
                          try:
                              col_indices.append(usecols_key.index(col))
                          except ValueError:
                              self._validate_usecols_names(self.usecols, usecols_key)
                      else:
                          col_indices.append(col)
              else:
                  missing_usecols = [
                      col for col in self.usecols if col >= num_original_columns
                  ]
                  if missing_usecols:
                      warnings.warn(
                          "Defining usecols with out of bounds indices is deprecated "
                          "and will raise a ParserError in a future version.",
                          FutureWarning,
                          stacklevel=8,
                      )
                  col_indices = self.usecols
  
              columns = [
                  [n for i, n in enumerate(column) if i in col_indices]
                  for column in columns
              ]
              self._col_indices = sorted(col_indices)
          return columns
function_tokens: def _handle_usecols ( self , columns : list [ list [ str | int | None ] ] , usecols_key : list [ str | int | None ] , num_original_columns : int , ) : if self . usecols is not None : if callable ( self . usecols ) : col_indices = self . _evaluate_usecols ( self . usecols , usecols_key ) elif any ( isinstance ( u , str ) for u in self . usecols ) : if len ( columns ) > 1 : raise ValueError ( "If using multiple headers, usecols must be integers." ) col_indices = [ ] for col in self . usecols : if isinstance ( col , str ) : try : col_indices . append ( usecols_key . index ( col ) ) except ValueError : self . _validate_usecols_names ( self . usecols , usecols_key ) else : col_indices . append ( col ) else : missing_usecols = [ col for col in self . usecols if col >= num_original_columns ] if missing_usecols : warnings . warn ( "Defining usecols with out of bounds indices is deprecated " "and will raise a ParserError in a future version." , FutureWarning , stacklevel = 8 , ) col_indices = self . usecols columns = [ [ n for i , n in enumerate ( column ) if i in col_indices ] for column in columns ] self . _col_indices = sorted ( col_indices ) return columns