Group Your Data By the Index

Leandro Ruiz
Aug 17, 2020 · 3 min read

A few days ago, I was working on a project on risk management, until I came across a simple problem that I had never seen.

The Problem

I needed to group data on the different IDs of a transaction dataset. This dataset contains 8,250 transactions for 1,125 customers of a bank.

Here are the first five rows: