pandas.DataFrame.update

Modify in place using non-NA values from another DataFrame.

Aligns on indices. There is no return value.

param other
DataFrame, or object coercible into a DataFrame

Should have at least one matching index/column label with the original DataFrame. If a Series is passed, its name attribute must be set, and that will be used as the column name to align with the original DataFrame.

param join
{‘left’}, default ‘left’

Only left join is implemented, keeping the index and columns of the original object.

param overwrite
bool, default True

How to handle non-NA values for overlapping keys:

  • True: overwrite original DataFrame’s values

    with values from other.

  • False: only update values that are NA in

    the original DataFrame.

param filter_func
callable(1d-array) -> bool 1d-array, optional

Can choose to replace values other than NA. Return True for values that should be updated.

param errors
{‘raise’, ‘ignore’}, default ‘ignore’

If ‘raise’, will raise a ValueError if the DataFrame and other both contain non-NA data in the same place.

Changed in version 0.24.0.

to errors=’ignore’|’raise’.

return

None : method directly changes calling object

raises
ValueError
  • When errors=’raise’ and there’s overlapping non-NA data.

  • When errors is not either ‘ignore’ or ‘raise’

    NotImplementedError

  • If join != ‘left’

Warning

This feature is currently unsupported by Intel Scalable Dataframe Compiler