Doing a quick check to see the size of my DataFrame shows that it's 2.4 GB and all columns are in float32 format.
df.info(memory_usage="deep")
<class 'pandas.core.frame.DataFrame'>
Int64Index: 1468379 entries, 1516035660 to 1604138340
Columns: 441 entries, Open to 2099520 EMA
dtypes: float32(441)
memory usage: 2.4 GB
I save the DataFrame to my pc and the reload it back using the following:
df.to_csv("CSV of BTC Price Plus Indicators.csv")
df = pd.read_csv('/Users/Moonboi/Coding/Crypto/CSV of BTC Price Plus Indicators.csv').set_index("Timestamp")
Then check the memory usage:
df.info(memory_usage="deep")
<class 'pandas.core.frame.DataFrame'>
Int64Index: 1468379 entries, 1516035660 to 1604138340
Columns: 441 entries, Open to 2099520 EMA
dtypes: float64(441)
memory usage: 4.8 GB
Now it takes up double the space and uses float64 instead of float32? Whats this all about? Can't I keep it in float32 format?