-
Notifications
You must be signed in to change notification settings - Fork 138
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
fix large csv reading #585 #605
base: master
Are you sure you want to change the base?
Conversation
use file path and chain df iterators
What specifically is this fixing? |
@@ -368,7 +369,7 @@ def CSV_to_chunks_of_dataframes(c, chunksize=2 ** 20, **kwargs): | |||
else: | |||
rest = [] | |||
|
|||
data = [first] + rest | |||
data = chain([first], rest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toolz.concat
should be able to do this, no? It's already imported, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no toolz.chain. similar functions in toolz just import itertools.
toolz source:
def concat(seqs):
""" Concatenate zero or more iterables, any of which may be infinite.
An infinite sequence will prevent the rest of the arguments from
being included.
We use chain.from_iterable rather than ``chain(*seqs)`` so that seqs
can be a generator.
>>> list(concat([[], [1], [2, 3]]))
[1, 2, 3]
See also:
itertools.chain.from_iterable equivalent
"""
return itertools.chain.from_iterable(seqs)
def concatv(*seqs):
""" Variadic version of concat
>>> list(concatv([], ["a"], ["b", "c"]))
['a', 'b', 'c']
See also:
itertools.chain
"""
return concat(seqs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, typo; I meant toolz.concat
, and it looks like that was already imported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to change it?
is this still being worked? |
no. it works. |
Any way to merge this soon? Currently preventing me from using odo. |
Same here, I can’t use odo |
use file path and chain df iterators