Skip to content

Commit

Permalink
Fix the many-to-one merge for multiple detectors per exposure
Browse files Browse the repository at this point in the history
  • Loading branch information
hsinfang committed Jun 24, 2024
1 parent a7970a5 commit 2cd175b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions prompt-processing/groups.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -945,12 +945,13 @@
"# When fan-out handles a group\n",
"df = get_df_from_loki_fanout(date, \"message deserialized\", f'|~ \"{survey}\"')\n",
"df.rename(columns={\"ts\": \"ts_fanout\"}, inplace=True)\n",
"df_loki = df_loki.merge(\n",
"df_loki = pandas.merge(\n",
" df_loki.reset_index(),\n",
" df,\n",
" on=\"groupId\",\n",
" how=\"outer\",\n",
" validate=\"one_to_one\",\n",
")"
" on=[\"groupId\"],\n",
" how=\"left\",\n",
" validate=\"many_to_one\",\n",
").set_index([\"groupId\", \"detector\"])\n"
]
},
{
Expand Down

0 comments on commit 2cd175b

Please sign in to comment.