Skip to content

Commit ed25d4d

Browse files
update utils (#8)
* fix: adding util function to copy colours onto the contacts dataframe Co-authored-by: Noelle Cheng <noellechengheiman@gmail.com>
1 parent 060c9ad commit ed25d4d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

LoopProjectFile/LoopProjectFileUtils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,3 +637,7 @@ def handleCSVlist(files, loopFilename, shared_path="/shared"):
637637
print(f"Failed to delete CSV file {csv_file}: {e}")
638638

639639
return "success", f"{loopFilename} is created and saved successfully"
640+
641+
def map_colors_to_contacts(contacts: pandas.DataFrame, stratigraphicLog: pandas.DataFrame) -> pandas.DataFrame:
642+
contacts = contacts.merge(stratigraphicLog[['layerId', 'colour1Red', 'colour1Green','colour1Blue']], on='layerId',how='left')
643+
return contacts

0 commit comments

Comments
 (0)