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

refactor io "read"-type functions into a single function #3811

Closed
cpcloud opened this issue Jun 8, 2013 · 8 comments
Closed

refactor io "read"-type functions into a single function #3811

cpcloud opened this issue Jun 8, 2013 · 8 comments
Labels
IO Data IO issues that don't fit into a more specific label Refactor Internal refactoring of code
Milestone

Comments

@cpcloud
Copy link
Member

cpcloud commented Jun 8, 2013

there's a few of these floating around basically to dispatch on different kinds of possibly ambiguous string/filename/url input. would be nice if there was something in common or util that just does what you want. this may be overly optimistic...

@cpcloud
Copy link
Member Author

cpcloud commented Jun 8, 2013

grin 'def _read\(' yields:

./pandas/io/ga.py:
  268 :         def _read(start, result_size):
./pandas/io/html.py:
  109 : def _read(io):
./pandas/io/parsers.py:
  179 : def _read(filepath_or_buffer, kwds):
 1335 :             def _read():

i'm assuming there's another one for the upcoming shiny new read_json stuff...
cc @hayd @jreback

@jreback
Copy link
Contributor

jreback commented Jun 8, 2013

I just added io. common where I out some of this

@cpcloud feel free to refactor those types of things

@cpcloud
Copy link
Member Author

cpcloud commented Jun 13, 2013

i think i'll wait until the dust settles from clipboard/json things before handling this...

@jreback
Copy link
Contributor

jreback commented Jul 26, 2013

I think this is actually all done, except for #4084

@cpcloud
Copy link
Member Author

cpcloud commented Jul 26, 2013

should i close? i might've been thinking too general here. i want(ed) a context manager called read that would read anything (url, file, stringio [a no op there], etc) anything that could be "read" from. i'm not sure that's the best way to go tho without a massive function handling special cases...

@jreback
Copy link
Contributor

jreback commented Jul 26, 2013

yeh might as well
io/common pretty good and can be updated as needed with common functions

maybe need an issue to go thru and consolidate web access type functions
(I think there is an issue about using the request module out there to do that)

@cpcloud
Copy link
Member Author

cpcloud commented Jul 26, 2013

requests is niiice.

@jreback
Copy link
Contributor

jreback commented Jul 26, 2013

yup linked it (maybe add a todo at the top from my comments?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Data IO issues that don't fit into a more specific label Refactor Internal refactoring of code
Projects
None yet
Development

No branches or pull requests

2 participants