Closed exsell-jc closed 1 year ago
As of right now tidypolars
is just for dplyr
/tidyr
functions - so I don't think that adding purrr
functions is in scope. But I'll leave this open for now because I do want to look into it a bit more.
One thing worth noting - python already has a map()
function built in that is called slightly differently than R. It's also a bit more extensible than purrr::map()
because it's essentially map/map2/pmap all built into one.
R | Python |
---|---|
map(list, func) |
map(func, list) |
map2(list1, list2, func) |
map(func, list1, list2) |
pmap(list(list1, list2, list3), func) |
map(func, list1, list2, list3) |
As I think about this more - I think I'm going to close this. I think python offers pretty solid options for iterations. Whether with map()
or using zip()
in list comprehensions.
I noticed that in
tidytable
, you have purrr functions likemap.()
, but not intidypolars
.Using for loops + lambda functions are just not desirable for collaborative coding / code readability/comprehension. In Python, even if there is a bit of sacrifice in performance, if it allows better code readability, it would be really nice to have.
Would something like
map.()
be in the scope of this repo?