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

Subtract one column, number or array (col_b) from another column (col_a).

  • 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.


(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.