Chapter 4: Data Manipulation and Analysis with pandas
In this chapter, you will learn about the Python pandas
library built upon NumPy, which provides data manipulation and analysis methods for structured data frames. The name pandas is derived from panel data, an econometrics term for multidimensional structured datasets, according to the Wikipedia page on pandas.
The pandas
library contains two fundamental data structures to represent and manipulate structured rectangular datasets with a variety of indexing options: Series and DataFrames. Both use the index data structure.
Most operations in the processing of financial data in Python are based upon DataFrames. A DataFrame is like an Excel worksheet – a two-dimensional table that may contain multiple time series stored in columns. Therefore, we recommend you execute all the examples in this chapter yourself in your environment to get practice with the syntax and to better know what is possible.
In this chapter, we...