Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • Great. I just had to add from functools import reduce to the top of this. So far this is doing what I want - I'll just check out some of the others also Commented Jun 24, 2020 at 13:16
  • In this case is the reduce function accepting three parameters: the lambda function, names, and df? Commented Jun 24, 2020 at 13:27
  • and it seems like names is passed to the name parameter and df is passed to the data parameter? Trying to understand what's going on here Commented Jun 24, 2020 at 13:30
  • All the examples of reduce that I see take two parameters? Commented Jun 24, 2020 at 13:31
  • OK so there are some good examples here showing both ways of doing it (reduce and loop) medium.com/@mrpowers/… Commented Jun 24, 2020 at 13:45