logoalt Hacker News

Pandas feels clunky coming from R. What about Haskell?

13 pointsby mchavtoday at 4:51 AM4 commentsview on HN

Comments

rgavuliaktoday at 11:10 AM

> This has a great SQL-ish API. Python is similar but starts to be a little clunky since it requires you to think about indices:

groupby has an as_index parameter for this very purpose

> Deducting the discount

You focus on doing the subtraction during the group by. Is there any good reason for this? You could either do it as a step before, or after summing up both columns. Putting too many things into one command is not good practice yet you benchmark the language based on how easy it is to do said bad practice

internet_pointstoday at 9:37 AM

> You need to read the previous line to understand what

that ended rather abruptly?

kermatttoday at 5:07 AM

Although not quite the same without a pipe operator, https://pola.rs was an improvement for me when missing the R dataframe syntax.

show 1 reply