-
Notifications
You must be signed in to change notification settings - Fork 651
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
FEAT-#7117: Support building range-partitioning from an index level #7120
Conversation
…index level Signed-off-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
Signed-off-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
Signed-off-by: Dmitry Chigarev <dmitry.chigarev@intel.com>
if RangePartitioningGroupby.get(): | ||
return tuple(df.sort_index() for df in dfs) |
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.
previously, the function was only sorting by index, however in case of the low amount of unique values in the index this approach may not work well, so sorting on column values as it appears to be more stable for dataframes
@@ -2453,7 +2454,7 @@ def _apply_func_to_range_partitioning( | |||
Parameters | |||
---------- | |||
key_columns : list of hashables | |||
Columns to build the range partitioning for. | |||
Columns to build the range partitioning for. Can't be specified along with `level`. |
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.
pandas.groupby.level
doc says: "Do not specify both by and level.", so we're putting the same restriction
@@ -1726,7 +1746,7 @@ def test_groupby_getitem_preserves_key_order_issue_6154(): | |||
], | |||
) | |||
def test_groupby_multiindex(groupby_kwargs): | |||
frame_data = np.random.randint(0, 100, size=(2**6, 2**4)) | |||
frame_data = np.random.randint(0, 100, size=(2**6, 2**6)) |
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.
increased the number from 16 to 64 to use multiple partitions
What do these changes do?
Adds support for building range-partitioning based on an index level(s) and enables range-partitioning support for
df.groupby(level=...)
cases.flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
git commit -s
docs/development/architecture.rst
is up-to-date