pd.Series to_csv method does not recognize "compression" · Issue #18958 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
There looks like something is wrong with the compression
argument in to_csv
forpd.Series
but pd.DataFrame
. This error is also in 0.20.3.
In [1]: Se_tmp = pd.Series(list("ACGT")) ...: Se_tmp.to_csv("~/test.tsv.gz", sep="\t", compression="gzip") ...:
TypeError Traceback (most recent call last) in () 1 Se_tmp = pd.Series(list("ACGT")) ----> 2 Se_tmp.to_csv("~/test.tsv.gz", sep="\t", compression="gzip")
TypeError: to_csv() got an unexpected keyword argument 'compression'
In [2]: Se_tmp.to_frame("testing_column").to_csv("~/test.tsv.gz", sep="\t", compression="gzip")
In [3]: pd.version Out[3]: '0.21.1'