Skip to content

Commit

Permalink
Added a function to remove types for unused columns.
Browse files Browse the repository at this point in the history
  • Loading branch information
pineapple-cat committed Mar 4, 2024
1 parent 6d680fe commit e7a37b3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions post-processing/config_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ def parse_columns(self):
dict.fromkeys((self.plot_columns + self.filter_columns +
([self.scaling_column.get("name")] if self.scaling_column else []))))

def remove_redundant_types(self):
"""
Check for columns that are no longer in use and remove them from the type dict.
"""

column_types = self.column_types.copy()
for col in column_types:
if col not in self.all_columns:
self.column_types.pop(col, None)

def to_dict(self):
"""
Convert information in the class to a dictionary.
Expand Down

0 comments on commit e7a37b3

Please sign in to comment.