Skip to content

Commit

Permalink
✨ Add data gap utils
Browse files Browse the repository at this point in the history
  • Loading branch information
i-be-snek committed Oct 19, 2024
1 parent a44d4bb commit 1afc307
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Database/scr/normalize_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from .log_utils import Logging


class DataGapUtils:
def __init__(self):
self.logger = Logging.get_logger("data-gap-utils")

@staticmethod
def fill_date(row: dict, replace_with_date: dict):
date_cols = [x for x in row.keys() if "_Date_" in x]
if all([True if row[d] is None else False for d in date_cols]):
for c in date_cols:
row[c] = replace_with_date[c]
return row

0 comments on commit 1afc307

Please sign in to comment.