Skip to content

Commit

Permalink
FEAT-modin-project#5145: Upgrade pandas to 1.5.1 (modin-project#5146)
Browse files Browse the repository at this point in the history
Signed-off-by: Igoshev, Iaroslav <iaroslav.igoshev@intel.com>
  • Loading branch information
YarShev authored and mvashishtha committed Oct 21, 2022
1 parent 823f967 commit cadb671
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 27 deletions.
2 changes: 1 addition & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: modin
channels:
- conda-forge
dependencies:
- pandas==1.5.0
- pandas==1.5.1
- numpy>=1.18.5
- pyarrow>=4.0.1
- dask[complete]>=2.22.0
Expand Down
2 changes: 1 addition & 1 deletion modin/pandas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
f"Starting Modin in compatibility mode to support legacy pandas version {__pandas_version__}"
)
elif PandasCompatVersion.CURRENT == PandasCompatVersion.LATEST:
__pandas_version__ = "1.5.0"
__pandas_version__ = "1.5.1"

if pandas.__version__ != __pandas_version__:
warnings.warn(
Expand Down
8 changes: 0 additions & 8 deletions modin/pandas/test/dataframe/test_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ def test_apply_key_error(func):
@pytest.mark.parametrize("data", test_data_values, ids=test_data_keys)
@pytest.mark.parametrize("func", ["kurt", "count", "sum", "mean", "all", "any"])
def test_apply_text_func_with_level(level, data, func, axis):
if (
func in ("any", "all")
and axis == 1
and PandasCompatVersion.CURRENT == PandasCompatVersion.LATEST
):
pytest.xfail(
"df.apply('str', axis=1) is broken in pandas 1.5.0: https://github.com/modin-project/modin/issues/5076"
)
func_kwargs = {"level": level, "axis": axis}
rows_number = len(next(iter(data.values()))) # length of the first data column
level_0 = np.random.choice([0, 1, 2], rows_number)
Expand Down
16 changes: 3 additions & 13 deletions modin/pandas/test/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,9 +874,7 @@ def test_simple_col_groupby():
)
eval_fillna(modin_groupby, pandas_groupby)
eval_count(modin_groupby, pandas_groupby)
if PandasCompatVersion.CURRENT != PandasCompatVersion.LATEST:
# due to https://github.com/modin-project/modin/issues/5078, that would fail on pandas 1.5.0
eval_size(modin_groupby, pandas_groupby)
eval_size(modin_groupby, pandas_groupby)
eval_general(modin_groupby, pandas_groupby, lambda df: df.take())
eval_groups(modin_groupby, pandas_groupby)

Expand Down Expand Up @@ -1363,9 +1361,7 @@ def test_groupby_multiindex(groupby_kwargs):
)
modin_groupby_equals_pandas(md_grp, pd_grp)
df_equals(md_grp.sum(), pd_grp.sum())
if PandasCompatVersion.CURRENT != PandasCompatVersion.LATEST:
# due to https://github.com/modin-project/modin/issues/5078, that would fail on pandas 1.5.0
df_equals(md_grp.size(), pd_grp.size())
df_equals(md_grp.size(), pd_grp.size())
# Grouping on level works incorrect in case of aggregation:
# https://github.com/modin-project/modin/issues/2912
# df_equals(md_grp.quantile(), pd_grp.quantile())
Expand Down Expand Up @@ -1440,13 +1436,7 @@ def test_groupby_with_kwarg_dropna(groupby_kwargs, dropna):
and any(col in modin_df.columns for col in by_kwarg)
):
df_equals(md_grp.sum(), pd_grp.sum())
if not (
groupby_kwargs == {"level": 1, "axis": 1}
and PandasCompatVersion.CURRENT == PandasCompatVersion.LATEST
):
# skip the check for df.groupby().size() on pandas 1.5.0
# as it's failing due to pandas bug: https://github.com/modin-project/modin/issues/5078
df_equals(md_grp.size(), pd_grp.size())
df_equals(md_grp.size(), pd_grp.size())
# Grouping on level works incorrect in case of aggregation:
# https://github.com/modin-project/modin/issues/2912
# "BaseOnPython" tests are disabled because of the bug:
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pandas==1.5.0
pandas==1.5.1
numpy>=1.18.5
pyarrow>=4.0.1
dask[complete]>=2.22.0
Expand Down
2 changes: 1 addition & 1 deletion requirements/env_hdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: modin_on_hdk
channels:
- conda-forge
dependencies:
- pandas==1.5.0
- pandas==1.5.1
- pyarrow=5
- numpy>=1.18.5
- fsspec
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements-no-engine.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
channels:
- conda-forge
dependencies:
- pandas==1.5.0
- pandas==1.5.1
- numpy>=1.18.5
- pyarrow>=4.0.1
- fsspec
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import versioneer
import sys

PANDAS_VERSION = "1.5.0" if sys.version_info >= (3, 8) else "1.1.5"
PANDAS_VERSION = "1.5.1" if sys.version_info >= (3, 8) else "1.1.5"

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
Expand Down

0 comments on commit cadb671

Please sign in to comment.