Transform messy transactions with pandas | Boston Consulting Group