Lecture 2: From NumPy to Pandas
09/01/2025
M. Tydrichova 09/01/2025
, Previously in Data science class...
Previously in Data science class...
M. Tydrichova 09/01/2025
, Previously in Data science class...
NumPy in a nutshell
Yesterday, we have seen:
differences between statically and dynamically typed languages
the slowness of Python for loops
NumPy array, its structure and a couple of ways to create it
Some techniques how to bypass Python for loops:
UFuncs
aggregates
slicing
boolean arrays and masks
broadcasting
M. Tydrichova 09/01/2025
, Previously in Data science class...
NumPy in a nutshell
During the lab session:
We have manipulated images represented as (2D or) 3D NumPy
arrays.
We have experinced the slowness of Python loop, and thus the
interest of NumPy vectorized operations, in practice.
We have seen that:
The most of the loops can be avoided...
... but it might be sometimes a bit tricky.
→ This should improve by practicing!
M. Tydrichova 09/01/2025