class_docstr: Imputed Data
  
  This class should not be instantiated directly.
  Instead, it is returned when ImputationKernel.impute_new_data() is called.
  For parameter arguments, see ImputationKernel documentation.
class_docstr_tok: ["Imputed","Data","This","class","should","not","be","instantiated","directly",".","Instead",",","it","is","returned","when","ImputationKernel.impute_new_data","(",")","is","called",".","For","parameter","arguments",",","see","ImputationKernel","documentation","."]
code: def _insert_new_data(self, dataset, variable_index, new_data):
      current_iter = self.iteration_count(
          datasets=dataset, variables=variable_index
      )
  
      # We need to insert the categories if the raw data is stored as a category.
      # Otherwise, pandas won't let us insert.
      view = _slice(self.working_data, col_slice=variable_index)
      if view.dtype.name == "category":
          new_data = np.array(view.cat.categories)[new_data]
  
      _assign_col_values_without_copy(
          dat=self.working_data,
          row_ind=self.na_where[variable_index],
          col_ind=variable_index,
          val=new_data,
      )
      self[dataset, variable_index, current_iter + 1] = new_data
      if not self.save_all_iterations:
          del self[dataset, variable_index, current_iter]
  
imports: import numpy
  from .compat import pd_DataFrame
  from .utils import _t_dat, _t_var_list, _t_var_dict, _ensure_iterable, _dict_set_diff, _assign_col_values_without_copy, _slice, _subset_data
  from itertools import combinations
  from typing import Dict, List, Union, Any, Optional
  from warnings import warn
label_desc: Use image node_id 14 for calling the ImputedData obj's underlying member method code with example usage: obj._insert_new_data(dataset, variable_index, new_data) without return types