From the course: Python for Data Visualization

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Basic operations

Basic operations

- [Narrator] After reading the contents of a file into your Pandas DataFrame, it's important to examine your data for a couple of reasons. First, you need to ensure that you've correctly loaded the data. Second, you have to see what kind of data you have. And third, you have to check the validity of your dataset, and I'll go through a couple ways we can do this. So one of the first things you do after loading your data is look at the head and the tail of your dataset. The method head selects the top N number of records from your dataset. The method tail selects the bottom N number of records from your dataset. This is really important to do as oftentimes your data format could change throughout your dataset. Another important thing to do is to check your column data types. You can do this by using the dtypes attribute. One thing we'll notice is that certain columns are ints, certain columns are floats, whereas others…

Contents