Skip to content

Conversation

@majidaldo
Copy link

use file path and chain df iterators

use file path and chain df iterators
@postelrich
Copy link
Contributor

What specifically is this fixing?

@majidaldo
Copy link
Author

#585

rest = []

data = [first] + rest
data = chain([first], rest)
Copy link

@brandonwillard brandonwillard Feb 15, 2018

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.

Copy link
Author

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)

Copy link

@brandonwillard brandonwillard Feb 15, 2018

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.

Copy link
Author

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?

@travisbusen
Copy link

is this still being worked?

@majidaldo
Copy link
Author

no. it works.

@guillochon
Copy link

Any way to merge this soon? Currently preventing me from using odo.

@travisbusen
Copy link

Same here, I can’t use odo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants