O'Reilly logo

Learning pandas - Second Edition by Michael Heydt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Manipulating DataFrame Structure

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required