Skip to content

Commit c5c1b52

Browse files
committed
Use provided attr name instead of column name for feature key
1 parent a475019 commit c5c1b52

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/funtracks/import_export/csv/_import.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,12 @@ def tracks_from_df(
267267
# Recompute from segmentation
268268
node_features[feature_key] = True
269269
else:
270-
# Load from column specified by feature_value
271-
node_features[feature_value] = False
270+
# Load from column — use feature_key as the feature name,
271+
# and add the key -> column mapping to node_name_map so the
272+
# builder knows which column to read from.
273+
node_features[feature_key] = False
274+
if node_name_map is not None:
275+
node_name_map[feature_key] = feature_value
272276

273277
builder = CSVTracksBuilder()
274278

0 commit comments

Comments
 (0)