Closed
Description
the DataFrame.to_csv method seems to accept a "compression" named parameter:
import numpy as np,pandas as pd
data=np.arange(10).reshape(5,2)
df=pd.DataFrame(data,columns=['a','b'])
df.to_csv('test.csv.gz',compression='gzip')
However, the file it creates is not compressed at all:
francesco@i3 ~/Desktop $ cat test.csv.gz
,a,b
0,0,1
1,2,3
2,4,5
3,6,7
4,8,9
How about either (i) actually implementing compression, or at least (ii) raise an error? The current behavior is confusing...