Just days in to hands-on learning data manipulation with Pandas, my instructor paused to make a point. “Do yourself a favor,” he said to the class, with more intention than ever before, “before going too much further in learning Pandas, watch this talk on vectorization.”
The value of vectorization seemed apparent, both from our instructor’s affect when he was directing us to the clip, and from the claim that the presenter in the clip was suggesting—vectorize your code to manipulate data 1000 times faster. The video breaks down several examples of using a variety of manipulation operations—Python for-loops, NumPy array vectorization, and a variety of Pandas methods—and compares the speed that outputs are returned for such methods. The results are clear: using techniques that take advantage of vectorization in Pandas would result in, just as the video’s click-attracting headline suggests, staggeringly faster data manipulation.

#python #simd #vectorization #numpy #pandas

Understanding Vectorization in NumPy and Pandas
3.70 GEEK