|
@@ -352,6 +352,18 @@ class MigrationCleaning:
|
|
|
self.log.log_and_raise_error(("Column {} contains missing values "
|
|
|
"and cannot be of integer type"
|
|
|
.format(column)))
|
|
|
+
|
|
|
+ elif python_type == bool:
|
|
|
+
|
|
|
+ data[column] = data[column].str.lower()
|
|
|
+ accepted_bool = {'ja': True, 'j': True, '1': True,
|
|
|
+ 'yes': True, 'y': True, 'true':True,
|
|
|
+ 't': True, 'nein': False, 'n': False,
|
|
|
+ 'no': False, 'false': False, 'f': False,
|
|
|
+ '0': False}
|
|
|
+ data[column] = data[column].map(accepted_bool)
|
|
|
+ data[column] = data[column].astype(bool)
|
|
|
+
|
|
|
|
|
|
elif python_type == str:
|
|
|
|