set_trial_in_tsv#

ethograph.labels.tsv_store.set_trial_in_tsv(all_df, trial, trial_df)[source]#

Replace all rows for a trial in the all-labels DataFrame.

Preserves per-trial metadata columns from the existing rows. The columns added to files written before they existed (event_type, individual_rec, confidence, labeling_method) are filled in on the whole table first: the untouched trials must not end up with NaN where the rewritten trial has a value. Any other per-trial column a loaded file carries (a legacy human_verified, say) rides along with the trial’s previous value, so rewriting one trial never blanks it.

Return type:

DataFrame