-
Notifications
You must be signed in to change notification settings - Fork 171
Feat: Series.shift Pyarrow Backend Implementation
#590
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
Merged
Merged
Changes from 58 commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
bdc6774
Feat: Series.sum test case
mfonekpo 27b74d8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] df7d353
Merge remote-tracking branch 'upstream/main' into factor_out_testing_β¦
mfonekpo bb4d3cf
test_series_sum refactoring
mfonekpo 88c1861
resolved merge conflicts
mfonekpo 523906b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 4fa8943
fixing according to standard
mfonekpo 968822d
resolving merge conflict
mfonekpo d500498
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 219caed
Merge remote-tracking branch 'upstream/main' into factor_out_testing_β¦
mfonekpo 668bb30
refactoring code to satisfy code criteria
mfonekpo a9c9a1e
resolved merge conflict
mfonekpo b64d960
Merge remote-tracking branch 'upstream/main' into factor_out_testing_β¦
mfonekpo 1d7eabe
Fixing Series.sum functionality for Pyarrow DF
mfonekpo 49f3f57
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 42f2541
Fixing compare mistake on Series.sum for Pyarrow
mfonekpo 3c62c73
Merge remote-tracking branch 'upstream/main' into factor_out_testing_β¦
mfonekpo ac7d829
Merge branch 'factor_out_testing_from_test_common' of https://github.β¦
mfonekpo 3af9833
cleaning up code
mfonekpo 7d80173
removing 'pyarrow_table' from test_sum_all and test_renamed_taxicab
mfonekpo d99630d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6eb346b
making sure CI passes all test cases
mfonekpo 7f16748
resolving merge conflict on sum_all_test.py file
mfonekpo 4998647
all test cases passed on CI
mfonekpo 542fe70
Merge remote-tracking branch 'upstream/main' into factor_out_testing_β¦
mfonekpo 0af3eb0
drop-nulls-test-case first push
mfonekpo 86a9dd2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 27f482b
resolve directory changes conflict
mfonekpo 8abec40
Merge branch 'Feat_Series_drop_nulls' of https://github.com/mfonekpo/β¦
mfonekpo ff6a616
refactoring everything to a single line
mfonekpo e06729d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] ab95998
Making corrections to the files listed
mfonekpo eebf6b2
Merge branch 'Feat_Series_drop_nulls' of https://github.com/mfonekpo/β¦
mfonekpo 59a7988
Merge remote-tracking branch 'upstream/main' into Feat_Series_drop_nulls
mfonekpo 02e166f
Merge remote-tracking branch 'upstream/main' into Feat_Series_drop_nulls
mfonekpo 5da2f40
full implementation of drop_dulls for Pyarrow
mfonekpo 859315d
Merge remote-tracking branch 'upstream/main' into Feat_Series_drop_nulls
mfonekpo bf46f22
removed drop_nulls function on test_common, and moved the test file tβ¦
mfonekpo 6123051
Update tests/expr_and_series/drop_nulls_test.py
MarcoGorelli 1b680ed
Update tests/expr_and_series/drop_nulls_test.py
MarcoGorelli c4de620
Final fix on drop_nulls
mfonekpo af635f2
Merge branch 'Feat_Series_drop_nulls' of https://github.com/mfonekpo/β¦
mfonekpo e0f4be2
Merge remote-tracking branch 'upstream/main' into Feat_Series_drop_nulls
mfonekpo 2556b8a
my first push for series_shift Pyarrow implementation
mfonekpo 617c991
Merge remote-tracking branch 'upstream/main' into Series_shift
mfonekpo 186af5b
Making changes for PR
mfonekpo 8d7439b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 4272980
Almost done; just 1 more push to complete
mfonekpo 59b7bd7
Merge remote-tracking branch 'upstream/main' into Series_shift
mfonekpo c7d9e84
resolving conflict and checking CI passes
mfonekpo cb73542
Merge remote-tracking branch 'upstream/main' into Series_shift
mfonekpo 3c0880e
renamed series_shift to series_shift_test
mfonekpo 65f11e5
Merge remote-tracking branch 'upstream/main' into Series_shift
mfonekpo 71863de
editing changes after reseting to my last push
mfonekpo ef5ea7a
Merge remote-tracking branch 'upstream/main' into Series_shift
mfonekpo 4798dfe
Merge branch 'Series_shift' of https://github.com/mfonekpo/narwhals iβ¦
mfonekpo 68b27d8
Merge remote-tracking branch 'upstream/main' into Series_shift
mfonekpo e8089eb
Final implementation of series_shift method for pyarrow backend
mfonekpo 1e28004
conflicts resolved and included fix for multi_chunk
mfonekpo 2bd652c
fixing ruff test fail on CI
mfonekpo 4722a8e
resolving conflicts
mfonekpo f0af84a
fixing pytest failing with TypeError
mfonekpo dd7a8e7
Merge remote-tracking branch 'upstream/main' into Series_shift
mfonekpo 55bf46b
final fix to series_shift pyarrow test
mfonekpo 19e9eff
Merge remote-tracking branch 'upstream/main' into Series_shift
mfonekpo 0e7981c
Merge remote-tracking branch 'upstream/main' into Series_shift
mfonekpo d646b83
I hope this works finally
mfonekpo 84086e9
Merge remote-tracking branch 'upstream/main' into Series_shift
mfonekpo bf0ffe7
changes on shift_test file
mfonekpo 1c326ec
Merge remote-tracking branch 'upstream/main' into Series_shift
mfonekpo c0ccc1f
series_shit_test complete
mfonekpo c5ae095
Merge remote-tracking branch 'upstream/main' into Series_shift
MarcoGorelli 5cd0279
fixup multi-chunk case
MarcoGorelli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
MarcoGorelli marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from typing import Any | ||
|
|
||
| import narwhals as nw | ||
| from tests.utils import compare_dicts | ||
|
|
||
|
|
||
| def test_shift(constructor: Any) -> None: | ||
| data = { | ||
| "A": [1, 2, None, 4], | ||
| "B": [5, 6, 7, 8], | ||
| "C": [None, None, None, None], | ||
| "D": [9, 10, 11, 12], | ||
| } | ||
|
|
||
| df = nw.from_native(constructor(data), eager_only=True) | ||
|
|
||
| result_a = df.select(nw.col("A").shift(1)) | ||
| result_b = df.select(nw.col("B").shift(-1)) | ||
| result_c = df.select(nw.col("C").shift(1)) | ||
| result_d = df.select(nw.col("D").shift(2)) | ||
|
|
||
| expected_a = {"A": [float("nan"), 1.0, 2.0, float("nan")]} | ||
| expected_b = {"B": [6.0, 7.0, 8.0, float("nan")]} | ||
| expected_c = {"C": [float("nan"), float("nan"), float("nan"), float("nan")]} | ||
| expected_d = {"D": [float("nan"), float("nan"), 9, 10]} | ||
|
|
||
| compare_dicts(result_a, expected_a) | ||
| compare_dicts(result_b, expected_b) | ||
| compare_dicts(result_c, expected_c) | ||
| compare_dicts(result_d, expected_d) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,6 @@ | |
| MISSING = [ | ||
| "DataFrame.pipe", | ||
| "Series.round", | ||
| "Series.shift", | ||
| ] | ||
|
|
||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.