From the course: Python Statistics Essential Training
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Shrinking numbers - Python Tutorial
From the course: Python Statistics Essential Training
Shrinking numbers
- [Instructor] In this lesson, we're going to look at changing the size of our numbers to save memory. One thing is I will do is create a function that will automatically convert integer values to smaller types. And then I'm going to show how to apply this function to our dataframe. You can actually take this function and apply it to your data as well. We're also going to make another function. I'm going to call that clean_housing that combine some of the steps that we've been looking at to clean up our data. This is something that I recommend you do as well as you're going through your data, cleaning it up, throw that into a chain and then take that chain and put it into a function. This is going to be a practice that, if you use it, will make your life a lot easier. We're going to continue where we left off. In our last lesson, we saw this assign method where we converted strings into categoricals and we also cleaned…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.