Have you ever wanted to get statistics of how long various parts of your code are executed to optimize your code? profile and CProfile allow you to profile your code, but the outputs are long and hard to understand, especially when using high-level libraries like pandas.
You can get a more readable output using pyinstrument. The code below shows how pyinstrument works.
Find other tips to speed up and track your code here.