Learning essential pandas.DataFrame operations
This section describes the essential operations done on DataFrames. Knowing they exist and how to use them will save you an enormous amount of time.
Indexing, selection, and filtering of DataFrames
pandas data structures are indexed by special Index
objects (while numpy.ndarrays
and Python list objects are only indexable by integers). The steps for this lesson are as follows:
- Let's inspect the contents of the
df2
DataFrame created earlier in the chapter:df2
The output is as follows:
uppercase A B C D lowercase a 1 10 100 1000 b 2 20 &...