4 ms·
I would like to see a stream processing library ported to pure Python. For example, Java 8 Stream API, Scala Stream API, Spark RDD API, jOOL API. They're all si
by ralmeida 9y ago
I would like to see a stream processing library ported to pure Python. For example, Java 8 Stream API, Scala Stream API, Spark RDD API, jOOL API. They're all similar.
That is, I would like to have an iterator in Python in which I could do:
from statistics import mean
from niceportedlib import Stream
salaries = Stream([]) # Some data here
mean_salary_by_department = salaries.group_by(lambda v: v['department']).map_values(statistics.mean)
Pandas does help, but is not pure Python (has native dependencies).
- jxub 9y agoThe streamz library (http://streamz.readthedocs.io/en/latest/ http://streamz.readthedocs.io/en/latest/) might be what you're looking for.