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

DOC: Cookbook example on reading CSV by chunking gives error #6583

Closed
nipunbatra opened this issue Mar 10, 2014 · 5 comments · Fixed by #6941
Closed

DOC: Cookbook example on reading CSV by chunking gives error #6583

nipunbatra opened this issue Mar 10, 2014 · 5 comments · Fixed by #6941
Labels
Milestone

Comments

@nipunbatra
Copy link
Contributor

URL linked in the cookbook: http://stackoverflow.com/questions/11622652/large-persistent-dataframe-in-pandas/12193309#12193309

Traceback:

  File "/usr/local/lib/python2.7/dist-packages/pandas/tools/merge.py", line 929, in concat
    verify_integrity=verify_integrity)
  File "/usr/local/lib/python2.7/dist-packages/pandas/tools/merge.py", line 944, in __init__
    '"{0}"'.format(type(objs).__name__))
AssertionError: first argument must be a list-like of pandas objects, you passed an object of type "TextFileReader"

To be precise: Concatenation does not work in this example.

@jreback
Copy link
Contributor

jreback commented Mar 10, 2014

what version pandas?

@nipunbatra
Copy link
Contributor Author

0.13.1

@jreback jreback added this to the 0.14.0 milestone Mar 10, 2014
@jreback
Copy link
Contributor

jreback commented Mar 10, 2014

want to submit a PR for this?

I think you can add a check for __iter__ where this assertionerror happens; but that might be too loose a check (IIRC this checks types very explicity)

@nipunbatra
Copy link
Contributor Author

@jreback : Sorry! Won't be able to do a PR. schedule is tight..

Maybe if you can update the Stack overflow answer on how to solve this, it may suffice? Like for version 0.13.1 this is how you do the same..

@jreback
Copy link
Contributor

jreback commented Apr 23, 2014

@nipunreddevil updated the SO answer (maybe edit more if you want). and fixed in master/0.14 by #6941

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