Open jamesrkg opened 3 years ago
One more exception occurs when attempting to view the categories for a categorical date variable with ds[var].categories
. In this case the error is KeyError: 'numeric_value'
. I'm not sure what the fix for this is.
Took care of
date
in Dataset.add_category
KeyError
gracefully for non required category argumentsDid not take care of Variable.date
that is not an attribute of the variable to make mutable.
Thanks @jjdelc!
Related to https://github.com/Crunch-io/scrunch/issues/387.
Two changes needed to support categorical dates (as far as I can tell):
Variable._MUTABLE_ATTRIBUTES
date
to set of mutable attributesVariable.add_category
:date=None
kwargdate is not None
, adddate
tonew_category
(which I've also separated out in the below example)