Use line profiling to speed up code execution. Consider different sizes and shapes (number of rows vs number of columns) of the datasets.