I load a very large csv file in a gz
format in Pandas 0.18 using
pd=pd.read_csv('myfile.gz')
Without surprise, once the csv is unzipped and loaded into the RAM, it takes a lot of space. However, I still need to save my file after I perform my computations.
Can to_csv
store my dataframe in a gz
format? The only related question I found on StackOverflow is 3 year old...
You could use the parameter compression='gzip'
source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With