Summary
In this chapter, we started with the basics of NumPy
arrays, including how to create them and their essential properties. We discussed and showed how a NumPy
array is optimized for vectorized element-wise operations and differs from a regular Python list. Then, we moved on to practicing various operations on NumPy
arrays such as indexing, slicing, filtering, and reshaping. We also covered special one-dimensional and two-dimensional arrays, such as zeros, ones, identity matrices, and random arrays.
In the second major topic of this chapter, we started with pandas
series objects and quickly moved on to a critically important object – pandas
DataFrames. They are analogous to Excel or Matlab or a database tab, but with many useful properties for data wrangling. We demonstrated some basic operations on DataFrames, such as indexing, sub-setting, row and column addition, and deletion.
Next, we covered the basics of plotting with matplotlib
, the most widely used and...