January 2020
Beginner to intermediate
432 pages
11h 24m
English
In general, pandas tries to load and store data efficiently. It automatically assigns data types (which we can inspect by calling the dtypes method of a pandas DataFrame). However, there are some tricks that can lead to much better memory allocation, which definitely make working with larger tables (in hundreds of MBs, or even GBs) easier.
df.dtypes
We only show a snippet of all the columns, for brevity:

In the preceding image, we see a few distinct data types: floats (floating-point numbers, such as 3.42), integers, and objects. The last ones are the pandas representation ...
Read now
Unlock full access