pandas provides a powerful manipulation engine for you to use to explore your data. This exploration often involves making modifications to the structure of DataFrame objects to remove unnecessary data, change the format of existing data, or to create derived data from data in other rows or columns. These chapter will demonstrate how to perform these powerful and important operations.
Specifically, in this chapter we will cover:
- Renaming columns
- Adding new columns with [] and .insert()
- Adding columns through enlargement
- Adding columns using concatenation
- Reordering columns
- Replacing the contents of a column
- Deleting columns
- Adding new rows
- Concatenating rows
- Adding and replacing rows via enlargement
- Removing rows using .drop()
- Removing rows using Boolean selection
- Removing rows using a slice