-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Some functions like map_to_brgi_db mutate the DataFrame that is passed in. This causes an error when calling some function twice, for example:
from bedrock_ge.gi.mapper import map_to_brgi_db
from bedrock_ge.gi.ags import ags_to_brgi_db_mapping
brgi_mapping_1 = ags_to_brgi_db_mapping("file1.ags", projected_crs)
brgi_db_1 = map_to_brgi_db(brgi_mapping_1)
brgi_db_2 = map_to_brgi_db(brgi_mapping_1) # ValueError(f"cannot insert {column}, already exists") ValueError: cannot insert project_uid, already existsSuggested Fix
We should avoid mutation by copying the passed in DataFrame, and optionally add an optional inplace parameter that is set to False by default.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working