Skip to content

Commit

Permalink
keep index and sort through compute-durations cli
Browse files Browse the repository at this point in the history
  • Loading branch information
LoannPeurey committed Feb 11, 2025
1 parent 171a39d commit a440fe1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ChildProject/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,12 +726,12 @@ def compute_durations(args):

durations = project.compute_recordings_duration(profile=args.profile).dropna()

recordings = project.recordings.merge(
recordings = project.recordings.reset_index().merge(
durations[durations["recording_filename"] != "NA"],
how="left",
left_on="recording_filename",
right_on="recording_filename",
)
).set_index('index')
recordings["duration"].fillna(0, inplace=True)
recordings["duration"] = recordings["duration"].astype("Int64")

Expand Down

0 comments on commit a440fe1

Please sign in to comment.