Skip to content

Commit

Permalink
simplify cleaning drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
hha.ext committed Nov 9, 2023
1 parent c9c3c50 commit b46b3e9
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions viadot/tasks/customer_gauge.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,9 @@ def _drivers_cleaner(
str: A cleaned and formatted string of driver data.
"""

drivers = drivers.split("}, {")
cleaned_drivers = []
for driver in drivers:
driver = driver.replace("{", "").replace("}", "")
driver = driver.replace("'", "").replace("label: ", "")
cleaned_drivers.append(driver)
return ', '.join(cleaned_drivers)
cleaned_drivers = drivers.replace("{", "").replace("}", "").replace("'", "").replace("label: ", "")

return cleaned_drivers

def __call__(self):
"""Download Customer Gauge data to a DF"""
Expand Down

0 comments on commit b46b3e9

Please sign in to comment.