Update scripts/base_network.py
Co-authored-by: Fabian Hofmann <fab.hof@gmx.de>
This commit is contained in:
parent
7ebf3b186c
commit
498f3bffad
@ -560,7 +560,7 @@ def _set_countries_and_substations(n, config, country_shapes, offshore_shapes):
|
|||||||
~buses["under_construction"]
|
~buses["under_construction"]
|
||||||
)
|
)
|
||||||
|
|
||||||
c_nan_b = buses.country.isna()
|
c_nan_b = buses.country.fillna("na") == "na"
|
||||||
if c_nan_b.sum() > 0:
|
if c_nan_b.sum() > 0:
|
||||||
c_tag = _get_country(buses.loc[c_nan_b])
|
c_tag = _get_country(buses.loc[c_nan_b])
|
||||||
c_tag.loc[~c_tag.isin(countries)] = np.nan
|
c_tag.loc[~c_tag.isin(countries)] = np.nan
|
||||||
|
Loading…
Reference in New Issue
Block a user