By default, Pandas always assigns the highest memory datatype to its columns. For instance, an integer-valued column always gets the int64 datatype, irrespective of its range. To reduce memory usage, represent it using an optimized datatype, which is enough to span the range of values in your columns.
Reduce Memory Usage Of A Pandas DataFrame By 90%
Reduce Memory Usage Of A Pandas DataFrame By…
Reduce Memory Usage Of A Pandas DataFrame By 90%
By default, Pandas always assigns the highest memory datatype to its columns. For instance, an integer-valued column always gets the int64 datatype, irrespective of its range. To reduce memory usage, represent it using an optimized datatype, which is enough to span the range of values in your columns.