-
-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEPR: deprecate Series/DataFrame.compound #26405
DEPR: deprecate Series/DataFrame.compound #26405
Conversation
I'm +1 on deprecating this, as a scalar verion of compount is not particularly useful (I'm an economist). But also, compound interests arrays can be a bit tricky to calulate in some cases. Would there be acceptance for adding e.g. |
Thanks, good to have feedback of somebody who knows something about it! :)
Personally, I would say, that looks a a bit too specific (but yeah, I would never use it myself). Maybe we should think about making it easier to do generic cumulative operations. |
Actually, that's |
Codecov Report
@@ Coverage Diff @@
## master #26405 +/- ##
==========================================
+ Coverage 91.69% 91.69% +<.01%
==========================================
Files 174 174
Lines 50743 50745 +2
==========================================
+ Hits 46527 46529 +2
Misses 4216 4216
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #26405 +/- ##
==========================================
- Coverage 91.69% 91.68% -0.01%
==========================================
Files 174 174
Lines 50739 50741 +2
==========================================
+ Hits 46523 46524 +1
- Misses 4216 4217 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. can you add a whats new note & add to the deprecated issue tracker
Added whatsnew |
Hey guys, as you mentioned there is no alternative suggested. I've been using this method for a while, what would be the shortest/cleanest way to replace this method on a Series? Thanks! |
it’s just (1 + s).prod() - 1 |
xref #18262
Not sure if we need to point to an alternative in the deprecation warning. I can put the exact "formula" for what we are currently calculating, but I don't know enough from finance to know if that is actually good to point to (eg I don't directly see that formula on the first google hit https://en.wikipedia.org/wiki/Compound_interest)