Specify Loops and Runs In %%timeit
We commonly use the %ππΆπΊπ²πΆπ (or %%ππΆπΊπ²πΆπ) magic command to measure the execution time of our code.
Here, ππΆπΊπ²πΆπ limits the number of runs depending on how long the script takes to execute. This is why you get to see a different number of loops (and runs) across different pieces of code.
However, if you want to explicitly define the number of loops and runs, use the -π» and -πΏ options. Use -π» to specify the loops and -πΏ for the number the runs.
Read this post on LinkedIn: Post Link.
I like to explore, experiment, and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn.