HyukjinKwon commented on a change in pull request #28743:
URL: https://github.com/apache/spark/pull/28743#discussion_r437844741
##########
File path: python/pyspark/sql/tests/test_arrow.py
##########
@@ -30,10 +30,14 @@
pandas_requirement_message, pyarrow_requirement_message
from pyspark.testing.utils import QuietTest
from pyspark.util import _exception_message
+from distutils.version import LooseVersion
if have_pandas:
import pandas as pd
from pandas.util.testing import assert_frame_equal
+ pandas_version = LooseVersion(pd.__version__)
+else:
+ pandas_version = LooseVersion("0")
Review comment:
I would do something like:
```python
pandas_version = None
if have_pandas:
import pandas as pd
from pandas.util.testing import assert_frame_equal
pandas_version = LooseVersion(pd.__version__)
```
if the linter is not happy with it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]