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

Suggestion: write_table: pass outpath alternative to TextIO #516

Open
joeflack4 opened this issue Apr 7, 2024 · 2 comments
Open

Suggestion: write_table: pass outpath alternative to TextIO #516

joeflack4 opened this issue Apr 7, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@joeflack4
Copy link
Collaborator

joeflack4 commented Apr 7, 2024

Just a minor suggestion. Instead of requiring that it be like this:

with open(outpath, 'w') as f:
    write_table(msdf, f)

how about having this option?

write_table(msdf, outpath)
@matentzn
Copy link
Collaborator

matentzn commented Apr 7, 2024

I think you are right, this would be convenient, but just like pandas:

msdf.to_tsv(outpath)

or

msdf.to_json(outpath)

@joeflack4
Copy link
Collaborator Author

Yeah I was thinking of that too; I think that's even better.

@joeflack4 joeflack4 added the enhancement New feature or request label Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants