Data.add

Data.add(col_a, col_b, replace=False, header=None, index=None)

Add one column, number or array (col_b) to another column (col_a).

Parameters
  • col_a (index) – First column to work with

  • col_b (index, float or 1D array) – Second column to work with.

Keyword Arguments
  • header (string or None) – new column header (defaults to a-b

  • replace (bool) – Replace the col_a column with the new data

  • index (column index or None) – Column to insert new data at.

Returns

(Stoner.Data) – The newly modified Data object.

If col_a and col_b are tuples of length two, then the firstelement is assumed to be the value and the second element an uncertainty in the value. The uncertainties will then be propagated and an additional column with the uncertainites will be added to the data.