dgilland / pydash

The kitchen sink of Python utility libraries for doing "stuff" in a functional way. Based on the Lo-Dash Javascript library.

Home Page:http://pydash.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

max_by should return max value, not object

stephanelsmith opened this issue · comments

From lodash
https://lodash.com/docs/#maxBy

This would also be consistent with sum_by, mean_by, etc...

I'm not sure I follow since the examples on https://lodash.com/docs/#maxBy have objects being returned which is what pydash does too when a list of objects is passed in.

You're right... it seems inconsistent to me in lodash. The documentation a bit different from the example. Sum_by, mean_by, etc... return just the value. Min_by is like max_by. Weird....

Sorry about that. I love this library btw.

No worries! Glad you've found library useful!