standardizeMissing
Insert standard missing values
Description
replaces values in B = standardizeMissing(A,indicator)A that match a value in the nonstandard missing value
indicator with standard missing values.
Standard missing values are defined according to the data type of A,
or if A is a table, the data type of each variable:
NaN—double,single,duration, andcalendarDurationNaT—datetime<missing>—string<undefined>—categorical{''}—cellof character vectors
In addition to standardizing missing values, you can interactively find, fill, or remove missing data by adding the Clean Missing Data task to a live script.
specifies additional parameters for standardizing missing values using one or more
name-value arguments. For example,
B = standardizeMissing(___,Name=Value)standardizeMissing(A,indicator,DataVariables=datavars) standardizes
missing values in the specified variables when A is a table or
timetable.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Algorithms
standardizeMissing treats leading and trailing white space differently
for cell arrays of character vectors, character arrays, and categorical arrays.
For cell arrays of character vectors,
standardizeMissingdoes not ignore white space. All character vectors must match exactly a character vector specified inindicator.For character arrays,
standardizeMissingignores trailing white space.For categorical arrays,
standardizeMissingignores leading and trailing white space.
Alternative Functionality
Live Editor Task
In addition to standardizing missing values, you can interactively find, fill, or remove missing data by adding the Clean Missing Data task to a live script.
