Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pandas.DataFrame.to_csv() unexpected argument sparsify #12

Open
kwkroll32 opened this issue Feb 4, 2017 · 2 comments · May be fixed by #13
Open

Pandas.DataFrame.to_csv() unexpected argument sparsify #12

kwkroll32 opened this issue Feb 4, 2017 · 2 comments · May be fixed by #13
Assignees
Labels

Comments

@kwkroll32
Copy link
Collaborator

Received an error writing vcf output. Apparently pandas.DataFrame.to_csv() doesn't accept the "sparsify" argument (anymore?). Not sure what it is supposed to do, but commenting it out stops the error and still produces a vcf file. If we can't remember where this came from, I propose we remove that argument from this particular to_csv call.

Pandas 0.19.1
See the offending line in output.VCF here

Traceback (most recent call last):
  File "/home/karl/Tools/mucor/mucor.py", line 699, in 
    main()
  File "/home/karl/Tools/mucor/mucor.py", line 690, in main
    printOutput(config, str(config.outputDir), varDF)
  File "/home/karl/Tools/mucor/mucor.py", line 649, in printOutput
    ow.write(varDF,format,outputDirName,config)
  File "/home/karl/Tools/mucor/output.py", line 95, in write
    self.supported_formats[format]()
  File "/home/karl/Tools/mucor/output.py", line 399, in VCF
    out.to_csv(ofVariantVCF, sep='\t', na_rep='?', index=False, header=True, sparsify=False)
TypeError: to_csv() got an unexpected keyword argument 'sparsify'
@jblachly
Copy link
Member

jblachly commented Feb 4, 2017 via email

kwkroll32 added a commit that referenced this issue Feb 4, 2017
@kwkroll32 kwkroll32 linked a pull request Feb 4, 2017 that will close this issue
@kwkroll32
Copy link
Collaborator Author

I got that error by simply trying to write vcf output. Something about my current environment must be different than before - Pandas 0.17 vs 0.19 maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants