Skip to content

Commit 6e85464

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 788b461 commit 6e85464

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

scripts/process_data.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,15 @@ def buses_from_lines(lines, geocode=True):
172172
lambda s: re.sub(r"([a-z])([A-Z])", r"\1 \2", s) if isinstance(s, str) else s
173173
)
174174
buses["name"] = buses.name.apply(
175-
lambda s: s.replace("ue", "ü")
176-
.replace("ae", "ä")
177-
.replace("oe", "ö")
178-
.replace("Itzehö", "Itzehoe")
179-
.replace("Daürsberg", "Dauersberg")
180-
if isinstance(s, str) and s[-2:] in ["DE", "AT"]
181-
else s
175+
lambda s: (
176+
s.replace("ue", "ü")
177+
.replace("ae", "ä")
178+
.replace("oe", "ö")
179+
.replace("Itzehö", "Itzehoe")
180+
.replace("Daürsberg", "Dauersberg")
181+
if isinstance(s, str) and s[-2:] in ["DE", "AT"]
182+
else s
183+
)
182184
)
183185
if geocode:
184186
buses = pd.concat([buses, buses.name.apply(locate)], axis=1)

0 commit comments

Comments
 (0)