Data Science Jumpstart with 10 Projects Transcripts
Chapter: Project 5: Cleaning Heart Disease Data in Pandas
Lecture: Converting the Chest Pain Column into an Int8
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
In this section we're going to look at chest pain and how to clean up that column. We should have
0:05
four values in here. Typical angina, atypical angina, non-anginal pain, and asymptomatic.
0:14
So let's look at those values. It looks like those are pi-arrow doubles.
0:19
And I'm going to see if I can convert those to integers. It looks like that worked. So in this
0:28
case converting those to integers did do the job. One thing that you could look at if it's an issue
0:35
is how much memory you're using. And we could see that each time we are converting these from
0:40
doubles or int64s to int8s we're saving 7 8ths of that memory because we're using much less memory to store these numbers.