data-science

lvh 2024-09-20T16:23:52.849179Z

When using tablecloth's unique-by, is there a way to keep the cols you're grouping by? (Basically I have records per client & date, there are often multiple records for the same client & date, I want to merge all other columns for a client & date tuple via sum, but I want to keep track of the [client,date] tuple, whereas unique-by seems to throw them out )

bocaj 2024-09-20T16:37:13.516719Z

Look at fold-by then sum the vec

bocaj 2024-09-20T16:39:07.309579Z

Or group-by then aggregate

👍 1
❤️ 1