DataResponsibly / DataSynthesizer

MIT License
252 stars 85 forks source link

DateTime conversion #18

Closed SG87 closed 4 years ago

SG87 commented 4 years ago

While trying to convert a string data from the input to a DateTime DataSynthesizer format, something is going wrong:

Traceback (most recent call last): File "/Users/stijngeuens/Google Drive/Digipolis/syntheticCRS-P/generator.py", line 32, in attribute_to_is_categorical=attribute_is_categorical) File "/Users/stijngeuens/Google Drive/Digipolis/syntheticCRS-P/DataSynthesizer/DataDescriber.py", line 172, in describe_dataset_in_correlated_attribute_mode seed) File "/Users/stijngeuens/Google Drive/Digipolis/syntheticCRS-P/DataSynthesizer/DataDescriber.py", line 120, in describe_dataset_in_independent_attribute_mode seed=seed) File "/Users/stijngeuens/Google Drive/Digipolis/syntheticCRS-P/DataSynthesizer/DataDescriber.py", line 98, in describe_dataset_in_random_mode column.infer_domain() File "/Users/stijngeuens/Google Drive/Digipolis/syntheticCRS-P/DataSynthesizer/datatypes/DateTimeAttribute.py", line 44, in infer_domain self.min = float(self.data_dropna.min()) ValueError: could not convert string to float: '1904-02-22'

haoyueping commented 4 years ago

Hi, please check out the latest code where self.min = float(self.data_dropna.min()) has been replaced with self.min = float(self.timestamps.min()).