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

SNOW-1669082: Add support for Resampler.asfreq #2310

Merged
merged 5 commits into from
Sep 18, 2024

Conversation

sfc-gh-nkrishna
Copy link
Contributor

SNOW-1669082

This PR implements Resampler.asfreq which follows the same underlying code path as Series.asfreq and DataFrame.asfreq which was implemented in a previous PR.

Copy link
Contributor

@sfc-gh-rdurrani sfc-gh-rdurrani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -56,3 +69,5 @@ def test_asfreq_negative():
snow_df.asfreq(freq="5s", method="ffill", normalize=True)
with pytest.raises(NotImplementedError):
snow_df.asfreq(freq="5s", method="ffill", fill_value=2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we testing DataFrame.asfreq here when the test file is test_resample_asfreq?

Copy link
Contributor Author

@sfc-gh-nkrishna sfc-gh-nkrishna Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DataFrame/Series.asfreq ends up just calling the resample implementation with the first aggregation. I didn't realize at that time the Resampler class also has an asfreq so this PR just adds that. That's why all 3 are tested in the same file under the resample folder.

Copy link
Contributor

@sfc-gh-helmeleegy sfc-gh-helmeleegy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall. Just a small question.

@sfc-gh-nkrishna sfc-gh-nkrishna enabled auto-merge (squash) September 18, 2024 20:19
@sfc-gh-nkrishna sfc-gh-nkrishna merged commit f7b9c67 into main Sep 18, 2024
37 checks passed
@sfc-gh-nkrishna sfc-gh-nkrishna deleted the nkrishna-SNOW-1669082-resampler-asfreq branch September 18, 2024 20:58
@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants