This is an automated email from the ASF dual-hosted git repository. gurwls223 pushed a commit to branch branch-3.4 in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.4 by this push: new f17b226fc80 [SPARK-44670][PYTHON][TESTS][PS][3.4] Fix 'test_dataframe_conversion.DataFrameConversionTest.get_excel_dfs' test to work with Python 3.7 f17b226fc80 is described below commit f17b226fc80a5984a28f2a900350566bfbc9ba86 Author: madlnu <mad...@visa.com> AuthorDate: Sun Aug 6 10:22:56 2023 +0900 [SPARK-44670][PYTHON][TESTS][PS][3.4] Fix 'test_dataframe_conversion.DataFrameConversionTest.get_excel_dfs' test to work with Python 3.7 ### What changes were proposed in this pull request? The fix is to use openpyxl by default instead of xlrd. ### Why are the changes needed? test_to_excel test case was failing in python3.7, asking for xlrd which is unable to read xlsx files. Improves test coverage. ### Does this PR introduce _any_ user-facing change? No, it's test only ### How was this patch tested? Manually Closes #42339 from Madhukar98/branch-3.4. Authored-by: madlnu <mad...@visa.com> Signed-off-by: Hyukjin Kwon <gurwls...@apache.org> --- python/pyspark/pandas/tests/test_dataframe_conversion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/pyspark/pandas/tests/test_dataframe_conversion.py b/python/pyspark/pandas/tests/test_dataframe_conversion.py index 67ff40e9f15..550a5fed8b1 100644 --- a/python/pyspark/pandas/tests/test_dataframe_conversion.py +++ b/python/pyspark/pandas/tests/test_dataframe_conversion.py @@ -86,8 +86,8 @@ class DataFrameConversionTest(ComparisonTestBase, SQLTestUtils, TestUtils): @staticmethod def get_excel_dfs(pandas_on_spark_location, pandas_location): return { - "got": pd.read_excel(pandas_on_spark_location, index_col=0), - "expected": pd.read_excel(pandas_location, index_col=0), + "got": pd.read_excel(pandas_on_spark_location, index_col=0, engine="openpyxl"), + "expected": pd.read_excel(pandas_location, index_col=0, engine="openpyxl"), } def test_to_excel(self): --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org