thomasjpfan opened a new issue, #34886:
URL: https://github.com/apache/arrow/issues/34886
### Describe the bug, including details regarding any error messages,
version, and platform.
Running `np.asarary` on a PyArrow Table returns the transpose of the data:
```python
import pyarrow as pa
import pandas as pd
import numpy as np
df = pd.DataFrame({'year': [2020, 2022, 2019, 2021],
'n_legs': [2, 4, 5, 100]})
pa_table = pa.Table.from_pandas(df)
# Converting to pandas first gives the expected result:
print(np.asarray(pa_table.to_pandas()))
# [[2020 2]
# [2022 4]
# [2019 5]
# [2021 100]]
# Calling `np.asarray` directly gives the transpose:
print(np.asarray(pa_table))
# [[2020 2022 2019 2021]
# [ 2 4 5 100]]
```
I expect that `np.asarray` gives the same result as
`np.asarray(pa_table.to_pandas())`.
### Component(s)
Python
--
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]