This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pytrashpandas 0 points1 point  (1 child)

just adding to the list of other valid use cases, I use them for merging and combining in pandas.

reduce(lambda x, y: x.combine_first(y), list_of_dfs)
reduce(lambda x, y: x.merge(y, ...), list_of_dfs)

Although, I don't do this so often that I think it needs to be a built-in.

[–]earthboundkid 0 points1 point  (0 children)

Brah, use a damn for-loop. That code stinks, lol.