Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/docs/source/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ Dependencies
============= ========================= ======================================
Package Minimum supported version Note
============= ========================= ======================================
`pandas` 0.23.2 Optional for Spark SQL
`pandas` 1.0.5 Optional for Spark SQL
`NumPy` 1.7 Required for MLlib DataFrame-based API
`pyarrow` 1.0.0 Optional for Spark SQL
`Py4J` 0.10.9.2 Required
`pandas` 0.23.2 Required for pandas API on Spark
`pandas` 1.0.5 Required for pandas API on Spark
`pyarrow` 1.0.0 Required for pandas API on Spark
`Numpy` 1.14 Required for pandas API on Spark
============= ========================= ======================================
Expand Down
1 change: 1 addition & 0 deletions python/docs/source/migration_guide/pyspark_3.2_to_3.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ Upgrading from PySpark 3.2 to 3.3
=================================

* In Spark 3.3, the ``drop`` method of pandas API on Spark DataFrame supports dropping rows by ``index``, and sets dropping by index instead of column by default.
* In Spark 3.3, PySpark upgrades Pandas version, the new minimum required version changes from 0.23.2 to 1.0.5.
2 changes: 1 addition & 1 deletion python/docs/source/user_guide/sql/arrow_pandas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ working with timestamps in ``pandas_udf``\s to get the best performance, see
Recommended Pandas and PyArrow Versions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For usage with pyspark.sql, the minimum supported versions of Pandas is 0.23.2 and PyArrow is 1.0.0.
For usage with pyspark.sql, the minimum supported versions of Pandas is 1.0.5 and PyArrow is 1.0.0.
Copy link
Member

Choose a reason for hiding this comment

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

Should we mention there are some issues with versions like 1.0.0, 1.0.1?

Copy link
Member Author

@Yikun Yikun Nov 30, 2021

Choose a reason for hiding this comment

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

How about:

For usage with pyspark.sql, the minimum supported versions of Pandas is 1.0.5 and PyArrow is 1.0.0. Lower versions (such as there are some known issues under with v1.0.0, v1.0.1, see more in link) or higher versions may be used, however, compatibility and data correctness can not be guaranteed and should be verified by the user.

Maybe need more suggestion from native speaker. T_T, and if it's necessary we could do it in next commits in this PR or followup.

Higher versions may be used, however, compatibility and data correctness can not be guaranteed and should
be verified by the user.

Expand Down
4 changes: 3 additions & 1 deletion python/pyspark/pandas/tests/test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2232,7 +2232,9 @@ def test_mad(self):
pser.index = pmidx
psser = ps.from_pandas(pser)

self.assert_eq(pser.mad(), psser.mad())
# Mark almost as True to avoid precision issue like:
# "21.555555555555554 != 21.555555555555557"
self.assert_eq(pser.mad(), psser.mad(), almost=True)

def test_to_frame(self):
pser = pd.Series(["a", "b", "c"])
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/sql/pandas/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
def require_minimum_pandas_version() -> None:
"""Raise ImportError if minimum version of Pandas is not installed"""
# TODO(HyukjinKwon): Relocate and deduplicate the version specification.
minimum_pandas_version = "0.23.2"
minimum_pandas_version = "1.0.5"

from distutils.version import LooseVersion

Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _supports_symlinks():
# For Arrow, you should also check ./pom.xml and ensure there are no breaking changes in the
# binary format protocol with the Java version, see ARROW_HOME/format/* for specifications.
# Also don't forget to update python/docs/source/getting_started/install.rst.
_minimum_pandas_version = "0.23.2"
_minimum_pandas_version = "1.0.5"
_minimum_pyarrow_version = "1.0.0"


Expand Down