Python Memory Management and Tips Transcripts
Chapter: Course conclusion and review
Lecture: Container types
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
When you think of the data structure that's gonna hold all of your data, you have to remember they're not all created equal.
0:07
We saw that we could have a list. We could have a typed array, in the case of numbers, we can have Pandas data frames,
0:14
we can have series, we can have NumPy arrays, we can have a list of classes,
0:18
all of these things have benefits and drawbacks for the way we use them in our program, but they also have very different memory costs.
0:26
For example, our simple little typed array was something like 10 times more efficient than storing those numbers in a list,
0:32
which is still more efficient than using things like Pandas or classes.
0:37
You may want to choose one of these more advanced data types because it does amazing
0:40
stuff for you, but just be aware that there is a memory price to be paid for it.