Skip to content

Commit

Permalink
add column
Browse files Browse the repository at this point in the history
  • Loading branch information
VLucet committed Jan 12, 2024
1 parent b7f893f commit 50e2f41
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mdtools/labelstudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ def post_process_annotations(ls_json, data_str="data/local-files/?d="):
bb = (
pd.json_normalize(bb["prediction"]["result"], sep = "_", max_level=1)
.assign(source_file = "/".join(ann["data"]["image"]
.replace(data_str, "").strip("/").split('/')[1:]))
.replace(data_str, "").strip("/").split('/')[1:]))
.assign(source_file_with_dep = "/".join(ann["data"]["image"]
.replace(data_str, "").strip("/").split('/')[0:]))
.rename(columns={'from_name': 'variable'})
)

Expand Down

0 comments on commit 50e2f41

Please sign in to comment.