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

ENH: allowed read_csv to accept a basestring as the buffer and interpret as StringIO #4084

Closed
jreback opened this issue Jun 29, 2013 · 1 comment
Labels
Enhancement IO CSV read_csv, to_csv IO Data IO issues that don't fit into a more specific label
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Jun 29, 2013

already do this in read_json

first check if its a valid filename (which is safe in python)
if so, then open and process
else try to use as a StringIO(buffer)

@jreback
Copy link
Contributor Author

jreback commented Jul 26, 2013

the downside of this is that a non-existant file returns an empty frame which is odd

``
(Pdb) path
'1yLtjInbe1.csv'
(Pdb) self.read_csv(path)
Empty DataFrame
Columns: [1yLtjInbe1.csv]
Index: []

@jreback jreback closed this as completed Jul 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement IO CSV read_csv, to_csv IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

No branches or pull requests

1 participant