Skip to content

Commit

Permalink
Create fill_defaults_in_transform_tables
Browse files Browse the repository at this point in the history
  • Loading branch information
olejandro committed Nov 11, 2024
1 parent 71b8491 commit b3f5105
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions xl2times/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,24 @@ def _populate_defaults(tag: Tag, dataframe: DataFrame, col_name: str, config: Co
]


def fill_defaults_in_transform_tables(
config: Config,
tables: dict[str, DataFrame],
model: TimesModel,
) -> dict[str, DataFrame]:
"""Fill in some of the missing values based on defaults in place."""
tags = [Tag.tfm_ins]

for tag in tags:
if tag in tables:
table = tables[tag]
# Populate other_indexes based on defaults
_populate_defaults(tag, table, "other_indexes", config)
tables[tag] = table

return tables


def apply_fixups(
config: Config,
tables: list[EmbeddedXlTable],
Expand Down

0 comments on commit b3f5105

Please sign in to comment.