Pandas DataFrames
Working with Pandas DataFrames Pandas uses the DataFrame class for working with tabular data. DataFrames allow you to read, sort, manipulate, and display data. In this exercise, you’ll create your first DataFrame and use it to do some initial exploration of a data set. Objectives When you finish this lab, you should be comfortable with: Loading data into a DataFrame from a CSV file Printing out the first or last five rows Viewing DataFrame attributes like its columns and shape Accessing individual columns Manipulating the data set including sorting, ranking, and grouping Adding new columns and populating them with generated data Changing the data type of a column Filtering data by column values using loc and numerical or qualitative values We’ll build on these further in the next lab.