|
@@ -170,4 +170,13 @@ class FlattenData():
|
|
|
for key in to_append:
|
|
|
dictionary[key] = to_append[key]
|
|
|
|
|
|
- return dictionary
|
|
|
+ return dictionary
|
|
|
+
|
|
|
+ def flatten_if_not_flat(self, data: pd.DataFrame):
|
|
|
+
|
|
|
+ for data_type in data.dtypes:
|
|
|
+ if data_type == object:
|
|
|
+ return self.flatten(data)
|
|
|
+
|
|
|
+ return data
|
|
|
+
|