Merge pull request #971 from koen-vg/fix-sanitize-locations
Only sanitize locations when there are buses with a location
This commit is contained in:
commit
db4219f4d5
@ -184,6 +184,7 @@ def sanitize_carriers(n, config):
|
|||||||
|
|
||||||
|
|
||||||
def sanitize_locations(n):
|
def sanitize_locations(n):
|
||||||
|
if "location" in n.buses.columns:
|
||||||
n.buses["x"] = n.buses.x.where(n.buses.x != 0, n.buses.location.map(n.buses.x))
|
n.buses["x"] = n.buses.x.where(n.buses.x != 0, n.buses.location.map(n.buses.x))
|
||||||
n.buses["y"] = n.buses.y.where(n.buses.y != 0, n.buses.location.map(n.buses.y))
|
n.buses["y"] = n.buses.y.where(n.buses.y != 0, n.buses.location.map(n.buses.y))
|
||||||
n.buses["country"] = n.buses.country.where(
|
n.buses["country"] = n.buses.country.where(
|
||||||
|
Loading…
Reference in New Issue
Block a user