This chapter introduces you to the pandas library and shows you the basics of working with DataFrame objects.
There are six notebooks that we will work through, each numbered according to when they will be used:
1-pandas_data_structures.ipynb: discusses the mainpandasdata structures and why we need them2-creating_dataframes.ipynb: walks through creatingDataFrameobjects from a variety of data sources, such as flat files, SQL queries, and other Python objects3-making_dataframes_from_api_requests.ipynb: shows how to collect data from an API and create aDataFrameobject with the result, using the USGS earthquake API4-inspecting_dataframes.ipynb: illustrates how perform an initial inspection of the data, including displaying theDataFrameobject and summarizing the contents5-subsetting_data.ipynb: showcases strategies for subsetting the data by rows, columns, and/or Boolean criteria6-adding_and_removing_data.ipynb: provides examples of adding additional rows/columns and removing rows/columns from aDataFrameobject
All the datasets necessary for the aforementioned notebooks, along with information on them, can be found in the data/ directory. The end-of-chapter exercises will use these datasets as well; solutions to the exercises can be found in the repository's solutions/ch_02/ directory.