[Pandas-dev] Was the range() function ever created in Pandas?

C W tmrsg11 at gmail.com
Sat May 25 14:41:40 EDT 2019


Thanks Joris.

I'm from the statistical side, not cs. Range is very fundamental --- part
of the 5-summary statistics.

My understanding is that Pandas is the R equivalent. Even the documentation
on github claims some methods are just R function written in Python.

Best!

On Sat, May 25, 2019 at 8:42 AM Joris Van den Bossche <
jorisvandenbossche at gmail.com> wrote:

> The issue you mention was actually closed by a commit adding a value_range
> function, but it was later deprecated and removed again.
>
> If you don't want everything that describe() gives, you can calculate (series.min(),
> series.max()) both manually.
> If you regularly need this, I would recommend writing a small function
> yourself that you can easily reuse.
>
> What is and what is not included in pandas is always a trade-off: a
> balance between more functionality out of the box vs an overload of
> functionality (and especially an too many methods on the Series/DataFrame
> objects) in which many users get lost.
> Currently, we already have a lot of methods on Series/DataFrame, and
> adding an extra needs a very good justification. Personally, I don't think
> that a range function is worth it.
>
> Best,
> Joris
>
> Op za 25 mei 2019 om 09:15 schreef C W <tmrsg11 at gmail.com>:
>
>> Hello all,
>>
>> I am want to calculate the range of a vector. I saw that someone asked
>> for range() in 2011, but was it ever created?
>> https://github.com/pandas-dev/pandas/issues/288
>>
>> Response at the time was to use df.describe(). But df.describe() gives
>> all the 5-number summary statistics, but I DON'T WANT wall the extra stuff
>> I didn't ask for. I was expecting a numerical number. I can use that to
>> feed into another function.
>>
>> It exists in Matlab and R, why not in Python? I'm quite frustrated every
>> time I need to calculate the range.
>>
>> Thanks in advance.
>> _______________________________________________
>> Pandas-dev mailing list
>> Pandas-dev at python.org
>> https://mail.python.org/mailman/listinfo/pandas-dev
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pandas-dev/attachments/20190525/d34ca393/attachment.html>


More information about the Pandas-dev mailing list