Commit 1c63a616 authored by Cecilia Nievas's avatar Cecilia Nievas
Browse files

Suppressed Pandas SettingWithCopyWarning

parent ee608425
Pipeline #44369 passed with stage
in 2 minutes and 40 seconds
......@@ -25,6 +25,8 @@ import pyproj
from gdecore.database_queries import DatabaseQueries
from gdecore.database_storage import DatabaseStorage
pandas.options.mode.chained_assignment = None
logger = logging.getLogger()
......@@ -708,8 +710,7 @@ class GDEProcessor:
"""
if building_classes.shape[0] > 0:
old_proportions = building_classes["proportions"].to_numpy()
building_classes.loc[:, "proportions"] = old_proportions / old_proportions.sum()
building_classes["proportions"] /= building_classes["proportions"].sum()
return building_classes
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment