DataFrame.replace
Replaces values in a DataFrame with specified values
danfo.DataFrame.replace(oldValue, newValue, options)
Parameters | Type | Description | Default |
---|---|---|---|
oldValue | String, boolean, Number | The value you want to replace | |
newValue | String, boolean, Number | The new value you want to replace the old value with | |
options | Object | columns: Array. An array of column names to replace, If not specified, replace all columns. inplace: Boolean indicating whether to perform the operation inplace or not. Defaults to false | {inplace: false} |
Examples
If a column name is not specified, replace works on all columns:
Last updated