7 Array-Oriented Programming with NumPy

Objectives

In this chapter you’ll:

  • Learn what arrays are and how they differ from lists.

  • Use the numpy module’s high-performance ndarrays.

  • Compare list and ndarray performance with the IPython %timeit magic.

  • Use ndarrays to store and retrieve data efficiently.

  • Create and initialize ndarrays.

  • Refer to individual ndarray elements.

  • Iterate through ndarrays.

  • Create and manipulate multidimensional ndarrays.

  • Perform common ndarray manipulations.

  • Create and manipulate pandas one-dimensional Series and two-dimensional DataFrames.

  • Customize Series and DataFrame indices.

  • Calculate basic descriptive statistics for data in a Series and a DataFrame.

  • Customize floating-point number precision in pandas output formatting. ...

Get Intro to Python for Computer Science and Data Science: Learning to Program with AI, Big Data and The Cloud now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.