Skip to content

Commit 9b8c453

Browse files
committed
avoid naming clash when merging position dataframes
1 parent 105182d commit 9b8c453

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rec_to_nwb/processing/builder/originators/position_originator.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,9 @@ def get_position_with_corrected_timestamps(position_tracking_path, ptp_enabled):
201201
# Additionally, for offline tracking, frames can be skipped if the
202202
# frame is labeled as bad.
203203
video_position_info = pd.merge(
204-
video_info, position_tracking, right_index=True, left_index=True, how="left"
205-
)
204+
video_info.drop(columns=[x for x in ['xloc','yloc','xloc2','yloc2'] if x in video_info.columns]),
205+
position_tracking, right_index=True, left_index=True, how="left"
206+
)
206207

207208
if ptp_enabled:
208209
logger.info("PTP detected")

0 commit comments

Comments
 (0)