Closed sfc-gh-rdurrani closed 8 months ago
Thanks for reporting this - I can reproduce this on the main branch.
Are you interested in making a PR?
Can I support you @lithomas1 ? I am new to open source and want to contribute.
Sure, contributing instructions can be found here https://pandas.pydata.org/docs/dev/development/contributing.html.
After you get set up, you'll want to figure out how dataframe validates the periods (the traceback should help you here) and port it over to the series method(which can be found in pandas/core/series.py
)
Then, you'll want to add a test in pandas/tests/series/methods/test_diff.py
(you can grep for the error message "periods must be an integer" to see how the test is done for the dataframe method), and a note to the whatsnew in doc/source/v2.3.0.rst
.
Hi I started working on this issue, i have found that there is no validation check in series, and series is using algorithms.diff(periods)
I think I fixed this issue.
Here is the pull request: https://github.com/pandas-dev/pandas/pull/56659
Please let me know in case of any issues.
Hi I have raised a PR addressing this issues,
Ready for Review
Thanks a lot, @lithomas1 for sharing the document. I have submitted the PR request for this issue. Not sure, how this is addressed with three people contributing.
@neha3004 @srinivaspavan9
I think @pmhatre1 started working on this before you, so I've closed your PRs.
I'm happy to help you get started with some other issues if you find any other interesting issues on the issue tracker, though.
Pandas version checks
[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of pandas.
[X] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example