Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Issue with compression in to_csv method #21241
after upgrading to the lastest version of pandas I have an issue with the code, that worked fine on the previous version (0.22.0):
df.to_csv( path_or_buf=csv_path, encoding='utf8', compression='gz', quoting=1, sep='\t', index=False)
With pandas 0.23.0 I get:
If I comment compression='gz' the code works fine.
referenced this issue
May 29, 2018
My apologies if I'm missing something, but shouldn't the compression value for GNU zip be, 'gzip', rather than 'gz'? https://pandas.pydata.org/pandas-docs/version/0.23/generated/pandas.DataFrame.to_csv.html
Thank you for the responses.
Well, I can't reproduce the issue with pandas 0.23.0 on my home machine, but it appears on two of my windows servers at work. I will try to make a clean install of anaconda on one of them and see what happens.
yeah, @CamWhitelaw, you're absolutely right. I've actually tried to change my code before pasted it here, in original version of my code it uses gzip.