Intermediate Operations
distinct() : Remove duplicates
distinct() : Remove duplicatesStream.of([1, 1, 2, 3]) \
.distinct() \
.to_list() # [1, 2, 3]drop_while() : Drop elements while the predicate is true
drop_while() : Drop elements while the predicate is trueStream.of([1, 2, 3]) \
.drop_while(lambda x: x < 3) \
.to_list() # [3]filter() : Restrict the Stream
filter() : Restrict the StreamStream.of([1, 2, 3, None]) \
.filter(lambda x: x is not None) \
.for_each(print) # 1 2 3flat_map() : Streams in Streams
flat_map() : Streams in Streamsgroup_by(): Group the stream by a given key
group_by(): Group the stream by a given keylimit() : Limit the Stream to a certain number of elements
limit() : Limit the Stream to a certain number of elementsmap() : Convert the elements in the Stream
map() : Convert the elements in the Streammap_to_float() : Convert the elements in the Stream to a Float
map_to_float() : Convert the elements in the Stream to a Floatmap_to_int() : Convert the elements in the Stream to an Integer
map_to_int() : Convert the elements in the Stream to an Integermap_to_str() : Convert the elements in the Stream to a String
map_to_str() : Convert the elements in the Stream to a Stringnumeric() : Convert the stream to a NumericStream
numeric() : Convert the stream to a NumericStreamparallel() : Convert the stream to a ParallelStream
parallel() : Convert the stream to a ParallelStreampeek() : View intermediate results
peek() : View intermediate resultsreversed() : Reverse Stream
reversed() : Reverse Streamsequential() : Convert the stream to a SequentialStream
sequential() : Convert the stream to a SequentialStreamskip() : Skip the first n elements of the Stream
skip() : Skip the first n elements of the Streamsorted() : Sort Stream
sorted() : Sort Streamtake_while() : Take elements while the predicate is true
take_while() : Take elements while the predicate is trueLast updated