Simple-Group-Level-Aggregations-in-Python-for-Machine-Learning Step1: make sure you install the following package: pip3 install pandas Step2: I wrote this in a Python IDE. However, it is best viewed in Jupyter Notebook as I mentioned in the script. Happy Coding!