MissingDataRules
✖
MissingDataRules
is an option for SemanticImport and related functions that specifies what should be considered "missing" and what to replace it with.
Details

- MissingDataRules->{s1->val1,s2->val2,…} specifies that whenever an element has the form of a string or string pattern si, it should be replaced in the output by a Missing incorporating vali.
- MissingDataRules-><name1->{s1->val1,…},name2->…,… > specifies replacements to use in columns with names namei.
- MissingDataRules->{{s1->val1,…},…} specifies replacements to use in successive columns.
- If vali is of the form Missing[…], it is used directly.
- MissingDataRules->Automatic uses heuristics to determine which elements should be considered missing.
Examples
Basic Examples (5)Summary of the most common use cases
Specify how to handle missing data:

https://wolfram.com/xid/0c0o7d921m59e-7v5e4


https://wolfram.com/xid/0c0o7d921m59e-dz1qeb

Match missing data by pattern:

https://wolfram.com/xid/0c0o7d921m59e-ckz1m


https://wolfram.com/xid/0c0o7d921m59e-keytx

Handle missing data differently in each column:

https://wolfram.com/xid/0c0o7d921m59e-qgqty


https://wolfram.com/xid/0c0o7d921m59e-c8yt2n

Handle missing data in the second column only:

https://wolfram.com/xid/0c0o7d921m59e-i395u


https://wolfram.com/xid/0c0o7d921m59e-e89nsf

Specify how to handle missing data by column name:

https://wolfram.com/xid/0c0o7d921m59e-ce3ep2


https://wolfram.com/xid/0c0o7d921m59e-fcm7ki

Wolfram Research (2014), MissingDataRules, Wolfram Language function, https://reference.wolfram.com/language/ref/MissingDataRules.html.
Text
Wolfram Research (2014), MissingDataRules, Wolfram Language function, https://reference.wolfram.com/language/ref/MissingDataRules.html.
Wolfram Research (2014), MissingDataRules, Wolfram Language function, https://reference.wolfram.com/language/ref/MissingDataRules.html.
CMS
Wolfram Language. 2014. "MissingDataRules." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MissingDataRules.html.
Wolfram Language. 2014. "MissingDataRules." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MissingDataRules.html.
APA
Wolfram Language. (2014). MissingDataRules. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MissingDataRules.html
Wolfram Language. (2014). MissingDataRules. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MissingDataRules.html
BibTeX
@misc{reference.wolfram_2025_missingdatarules, author="Wolfram Research", title="{MissingDataRules}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/MissingDataRules.html}", note=[Accessed: 18-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_missingdatarules, organization={Wolfram Research}, title={MissingDataRules}, year={2014}, url={https://reference.wolfram.com/language/ref/MissingDataRules.html}, note=[Accessed: 18-May-2025
]}