Author rhettinger
Recipients Windson Yang, francismb, rhettinger, steven.daprano
Date 2019-02-16.22:52:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I've been thinking about this a bit more.  ISTM that for now, it's best to get mode() working for everyday use, returning just the first mode encountered.  This keeps the signature simple (Iterable -> Scalar).

In the future, if needed, there is room to add separate functions with their own clean signatures and use cases.  For example, having a separate multimode() that always returns a list would be clearer and easier to use than setting a flag on the current scalar valued mode() function. 

Another example would be mode_estimate() that returns a scalar float
that estimates the mode given data sampled from a continuous variable. This warrants its own function because the signature, use cases, options, and implementation method are all completely different from a mode based on counting.

Categorical, binned, or ordinal data:

   mode(data: Iterable, *, first_tie=False) -> object
   multimode(data: Iterable) -> List[object]

Continuous data:

   mode(data: Iterable[Real]) -> Real
Date User Action Args
2019-02-16 22:52:05rhettingersetrecipients: + rhettinger, steven.daprano, francismb, Windson Yang
2019-02-16 22:52:05rhettingersetmessageid: <>
2019-02-16 22:52:05rhettingerlinkissue35892 messages
2019-02-16 22:52:05rhettingercreate