milesgranger commented on code in PR #14729:
URL: https://github.com/apache/arrow/pull/14729#discussion_r1033966041
##########
python/pyarrow/tests/test_pandas.py:
##########
@@ -2164,9 +2172,17 @@ def test_nested_large_list(self):
s = (pa.array([[[1, 2, 3], [4]], None],
type=pa.large_list(pa.large_list(pa.int64())))
.to_pandas())
- tm.assert_series_equal(
- s, pd.Series([[[1, 2, 3], [4]], None], dtype=object),
- check_names=False)
+
+ # pandas.testing generates a
+ # DeprecationWarning: elementwise comparison failed
+ # numpy.VisibleDeprecationWarning: Creating an ndarray
+ # from ragged nested sequences ...
Review Comment:
Hmm, actually, when making an example for the issue to report, I _think_ it
maybe how our implementation of converting a variable list array to pandas:
```python
import pyarrow as pa
import pandas as pd
import pandas.testing as tm
s = (pa.array([[[1, 2, 3], [4]], None],
type=pa.large_list(pa.large_list(pa.int64())))
.to_pandas())
# This will raise the warning
tm.assert_series_equal(
s, pd.Series([[[1, 2, 3], [4]], None], dtype=object),
check_names=False)
# but so will this:
s.equals(pd.Series([[[1, 2, 3], [4]], None], dtype=object))
# this will not
tm.assert_series_equal(
pd.Series([[[1, 2, 3], [4]], None], dtype=object),
pd.Series([[[1, 2, 3], [4]], None], dtype=object),
check_names=False)
```
Therefore I think a new issue to be made to correct this on our end after
all. :thinking:
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]