[Pandas-dev] Consensus on pct_change

Pietro Battiston me at pietrobattiston.it
Fri Jul 12 03:30:28 EDT 2019


I agree "percentage" strictly speaking denotes what goes _before_ the
percent sign... but I'm -1 on changing the method behavior, and -0 on
changing the method name.
I'm obviously +1 on clarifying the docs.

Pietro

Il giorno gio, 11/07/2019 alle 11.58 +0100, Marc Garcia ha scritto:
> I'm -1 on changing the method, but I think the docstring of
> pct_change can be improved, and also include a note for that.
> 
> Can you (or may be your students) open an issue or PR for this? Since
> you found it confusing, I think you're the best people to clarify the
> documentation and write it in a way that other people don't have the
> same misunderstanding as you just had.
> 
> Thanks!
> 
> On Wed, Jul 10, 2019 at 4:08 PM Matthew Brett <
> matthew.brett at gmail.com> wrote:
> > Hi,
> > 
> > On Wed, Jul 10, 2019 at 7:59 AM Chris Bartak <cbartak at gmail.com>
> > wrote:
> > >
> > > I'm sure it depends on your background (mine is more financial
> > than academic), but at least for some users this isn't confusing or
> > surprising - I would say 10% is equivalent to 0.10.  Excel works
> > that way, as well as most pocket calculators with a '%' key.
> > 
> > I think we agree that 0.1 is a proportion and 10 is a percentage,
> > and
> > it's easy to display a proportion as a percentage (by multiplying
> > by
> > 100).  So, if there was some way of keeping track of the values as
> > being a proportion, and displaying as a percentage, this would make
> > sense.   So, the ideal might be a function called prop_change that
> > returned the current values, but displayed as a percentage.
> > 
> > I think you're right though - there isn't an easy way of doing that
> > -
> > hence the confusion.
> > 
> > Cheers,
> > 
> > Matthew
> > _______________________________________________
> > Pandas-dev mailing list
> > Pandas-dev at python.org
> > https://mail.python.org/mailman/listinfo/pandas-dev
> 
> _______________________________________________
> Pandas-dev mailing list
> Pandas-dev at python.org
> https://mail.python.org/mailman/listinfo/pandas-dev



More information about the Pandas-dev mailing list