-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
BUG/TST: Allow generators in DataFrame.from_records #4911
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
Conversation
pls add release notes ( thanks! |
Sorry for the mess, I'm new to github. |
I recognize that this may be silly, but how is this supposed to work if you passed something like this: gen = ('a' for _ in range(50))
DataFrame.from_records(gen) Just wondering if this needs to be caught anywhere or if this is okay |
I suppouse it's ok, the patch only put the generator in a list in the same fashion as main constructor. |
it's fine, it looks like it just works the same as a list. Doesn't need to be added as a test case either. |
@tinproject can you rebase and squash to commit? otherwise looks ok |
Hope it's ok, if it's not please give me a git command example, as i said i'm new to git :( |
pretty good instructions here: https://github.com/pydata/pandas/wiki/Using-Git, let us know |
I think it's now ok. Release notes file release.rst conflicts but are trivial and I thought I solved it. |
try |
- nrows implementation doesn't allow unknown size iterator like generators, if nrows = none ends with a TypeError. - To allow generators if nrows=None consume it into a list. - Add two tests of generators input. - Add release notes for #4910
@jreback now it's all ok, no? I must improve on git, sorry. |
yes...looks good.....let me review |
git just comes from practice! submit more PR's! |
@tinproject thank you! |
closes #4910
generators, if nrows = none ends with a TypeError.