tally.dataset.DataSet.copy#

DataSet.copy(**kwargs)#

Copy meta and case data of the variable defintion given per name.

Parameters
  • name (string) – The column variable name.

  • suffix (string (default "rec")) – The new variable name will be constructed by suffixing the original name with _suffix, e.g. age_rec

  • copy_data (boolean (default true)) – The new variable assumes the data of the original variable.

  • slicer (dict) – If the data is copied it is possible to filter the data with a complex logic.

  • copy_only (int or list of int, default None) – If provided, the copied version of the variable will only contain (data and) meta for the specified codes.

  • copy_not (int or list of int, default None) – If provided, the copied version of the variable will contain (data and) meta for the all codes, except of the indicated.

  • new_name (string) – If provided, the returned object will contain this new name instead of name_suffix