data-science 2024-09-20

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 )

Look at fold-by then sum the vec

Or group-by then aggregate

👍 1
❤️ 1