Re:Lets-Plot: An open-source plotting library by JetBrains
by atombender on Sunday July 16, 2023 @07:08AM
(#36745629)
Python doesn't have a built-in pipe operator, but that doesn't mean you can't do it. The pipe [1] library is popular.
is_even = where(lambda x: x % 2 == 0)
sum(fib() | is_even | take_while(lambda x: x < 4000000)
The Apache Beam SDK for Python is another example. It has its own pipe expressions (|, >>, |>, etc.).
Re:Lets-Plot: An open-source plotting library by JetBrains
by heywhatupboys on Sunday July 16, 2023 @11:45AM
(#36748295)
I would haver have + than | if we introduce "custom" operators.
Like maybe bitshifting strings into streams wasn't the right syntax, Bjarne
Re:Lets-Plot: An open-source plotting library by JetBrains
by ftobin on Tuesday July 18, 2023 @01:14AM
(#36768090)
datar effectively recreates a pipe operator and the tidyverse approach.
df >> mutate(z=f.x)
https://pypi.org/project/datar/
do you want to do
plot(density(colorify(labelaxis(logscale .... )))))))