Cannot use any scalar constraint (ScalarRange
, ScalarInequality
) with numerical columns that can be confused as datetimes
#2328
Labels
Environment Details
Error Description
I may have a numerical column (listed as sdtype numercial in my metadata) that may be easily mistaken for a datetime. For example, it may contain numerical integers such as 2024, 2023, 2022, etc.
In such cases, I am able to generally fit and sample synthetic data. However, if I try adding any of the scalar constraints (
ScalarRange
,ScalarInequality
), then I get an ValueError when fitting.Steps to reproduce
Output:
Workaround
In the meantime, a workaround to this would be to add a constant to each value in this column such that it does not get confused for a datetime. Eg. adding 2000 will produce values such as
4040, 4021, ...
what won't be assumed to be datetimes. After sampling synthetic data, you can subtract the constant value to get values in the original ranges. Note that if the same constant is added everywhere, it should not have any effect on the synthetic data quality.The text was updated successfully, but these errors were encountered: