https://pythonprogramminghelp.com/3-greatest-hacks-for-longitudinal-data/