All Questions
Tagged with more-itertools python-3.x
5 questions
-1
votes
2
answers
33
views
How to group or batch the list of elements based on indices sublist?
How to group or batch the list of elements based on indices sublist ?
Below are the possible instances should be considered. Hope that helps better.
1st Instance : Length of elements == sum of all ...
0
votes
1
answer
89
views
(more_)itertools function to group (predicate true/false) tuples with group borders at first item in group
I'm looking for an iterator preferably from itertools or more_itertools that groups my_list such that each group starts at the first even digit that follows after an odd digit (or has no predecessor).
...
0
votes
1
answer
44
views
Return large list of tuples with replaced dictionary value
In python, I have a list of tuples (lot) with patient data, as shown below:
lot = [('490001', 'A-ARM1', '1', '2', "a", "b"),
('490001', 'A-ARM2', '3', '4', "c", &...
0
votes
0
answers
135
views
How to make delimited item in split_at (more_itertools) dynamic
I am using split_at from more_itertools. The reason is that I have a list of 70k records in which Record i [Record 1, Record 2, ...Record n] occurs. I need to split the list at these Record i ...
3
votes
2
answers
1k
views
Python join more_itertools.windowed results
I have a following problem: I am trying to create so-called "digrams", like this:
If I have a word foobar, I want to get a list or a generator like: ["fo", "oo", "ob", "ba", "ar"]. The perfect ...