refactor: PR feedback implemented

This commit is contained in:
TrisNol 2023-11-11 11:18:23 +01:00
parent 834f93a26e
commit b0bcdc6fe1

View File

@ -248,8 +248,7 @@ class Bundesanzeiger:
return None return None
return transformed_value * factor return transformed_value * factor
for index, row in table.iterrows(): table[table.columns[0]] = table[table.columns[0]].apply(cleanse_string) # type: ignore
table.iloc[index][0] = cleanse_string(row.iloc[0]) # type: ignore
converter = { converter = {
"Mio€": 1 * 10**6, "Mio€": 1 * 10**6,
@ -304,8 +303,7 @@ class Bundesanzeiger:
if not isinstance(name_cleansed, str): if not isinstance(name_cleansed, str):
continue continue
for exp in exps: for exp in exps:
# print(row[0]) name_cleansed = re.sub(exp, "", name_cleansed.strip())
name_cleansed = re.sub(exp, "", name_cleansed).strip()
kpis[name_cleansed] = row.iloc[1] kpis[name_cleansed] = row.iloc[1]
return kpis return kpis