Skip to content

Conversation

@Yikun
Copy link
Member

@Yikun Yikun commented Dec 9, 2022

What changes were proposed in this pull request?

According to https://pandas.pydata.org/docs/reference/api/pandas.io.formats.style.Styler.to_latex.html:
pandas.io.formats.style.Styler.to_latex introduced since 1.3.0, so before panda 1.3.0, should skip the check

ERROR [0.180s]: test_style (pyspark.pandas.tests.test_dataframe.DataFrameTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/__w/spark/spark/python/pyspark/pandas/tests/test_dataframe.py", line 5795, in test_style
    check_style()
  File "/__w/spark/spark/python/pyspark/pandas/tests/test_dataframe.py", line 5793, in check_style
    self.assert_eq(pdf_style.to_latex(), psdf_style.to_latex())
AttributeError: 'Styler' object has no attribute 'to_latex'

Related: 58375a8

Why are the changes needed?

This test break the 3.2 branch pyspark test (with python 3.6 + pandas 1.1.x), so I think better add the skipIf it.

See also #38982 (comment)

Does this PR introduce any user-facing change?

No

How was this patch tested?

@Yikun
Copy link
Member Author

Yikun commented Dec 9, 2022

This might the right way to fix the 3.2 branch.

The check_style test introduced jinja2 deps and also panda > 1.3.0 reuqired, but for branch-3.2 we use python3.6, so we better to just skip it to recover branch-3.2 test.

@Yikun
Copy link
Member Author

Yikun commented Dec 9, 2022

@HyukjinKwon Thanks, let's wait the CI results of 3.2/master. : )

@Yikun Yikun marked this pull request as ready for review December 9, 2022 14:06
@Yikun Yikun closed this in dd0bd07 Dec 9, 2022
@Yikun
Copy link
Member Author

Yikun commented Dec 9, 2022

@dongjoon-hyun @HyukjinKwon Thanks, merged to master/branch-3.3/branch-3.2

beliefer pushed a commit to beliefer/spark that referenced this pull request Dec 18, 2022
### What changes were proposed in this pull request?
According to https://pandas.pydata.org/docs/reference/api/pandas.io.formats.style.Styler.to_latex.html:
`pandas.io.formats.style.Styler.to_latex` introduced since 1.3.0, so before panda 1.3.0, should skip the check

```
ERROR [0.180s]: test_style (pyspark.pandas.tests.test_dataframe.DataFrameTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/__w/spark/spark/python/pyspark/pandas/tests/test_dataframe.py", line 5795, in test_style
    check_style()
  File "/__w/spark/spark/python/pyspark/pandas/tests/test_dataframe.py", line 5793, in check_style
    self.assert_eq(pdf_style.to_latex(), psdf_style.to_latex())
AttributeError: 'Styler' object has no attribute 'to_latex'
```

Related: apache@58375a8

### Why are the changes needed?
This test break the 3.2 branch pyspark test (with python 3.6 + pandas 1.1.x), so I think better add the `skipIf` it.

See also apache#38982 (comment)

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
- CI passed
- Test on 3.2 branch: Yikun#194, https://github.com/Yikun/spark/actions/runs/3655564439/jobs/6177030747

Closes apache#39002 from Yikun/skip-check.

Authored-by: Yikun Jiang <[email protected]>
Signed-off-by: Yikun Jiang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants