After a left JoinAcross, I have a number of Missing["Unmatched"] values in my list of associations. I'd like to set them all equal to zero. I tried the following:
q = JoinAcross[Normal[reported], Normal[estimates], Key["key"], "Left"];
q1 = q /. Missing["Unmatched"] -> 0;
q[[100]]
q1[[100]]
<|"key" -> "2009-ABCDE", "ActuarialEPI" -> 26603.6, "ReportedEP" -> 28535., "ReportedLI" -> 0., "ELI" -> 25619.3, "DLI" -> 25619.3, "EstimatesEP" -> Missing["Unmatched"]|><|"key" -> "2009-ABCDE", "ActuarialEPI" -> 26603.6, "ReportedEP" -> 28535., "ReportedLI" -> 0., "ELI" -> 25619.3, "DLI" -> 25619.3, "EstimatesEP" -> Missing["Unmatched"]|>
Edit
I neglected to mention that I need to do this to the entire list of associations. I used element 100 as an example.
Asssociationadheres to.Associationflattens its arguments and when the same key appears several times the last key always wins. In my solutiondefaultprecedesdataso it is usually overwritten, but when I delete keys with missing valuesdefaultswill not be overwritten for those keys. – C. E. Aug 25 '14 at 15:42