Skip to content
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

Implement a shift function #11

Closed
femtotrader opened this issue Aug 7, 2017 · 3 comments
Closed

Implement a shift function #11

femtotrader opened this issue Aug 7, 2017 · 3 comments
Assignees

Comments

@femtotrader
Copy link
Contributor

femtotrader commented Aug 7, 2017

Hello,

a shift function similar to https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.shift.html could be useful.

A pct_chg function could be useful also
http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.pct_change.html

Kind regard

PS: could help #1

@dysonance
Copy link
Owner

I believe the lag function is what you're probably looking for, though I can quickly add a shift method to just alias the lag function.

As for percentage changes, you can do diff(log(X)) for continuous, or diff(X, pad=true, padval=NaN) ./ X for discrete.

This does indicate another need with docs though, which is just the need to get more of the basic functionality documented somewhere.

@dysonance dysonance self-assigned this Dec 1, 2017
@dysonance dysonance added the docs label Dec 1, 2017
@dysonance dysonance mentioned this issue Dec 2, 2017
@dysonance
Copy link
Owner

Pull request to address this opened here: #15

@dysonance
Copy link
Owner

PR above has been merged, closing now, let me know if more to be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants