rok opened a new issue, #48961:
URL: https://github.com/apache/arrow/issues/48961
### Describe the bug, including details regarding any error messages,
version, and platform.
It seems pandas 3 changed default string type when going from python types?
```python
_________________ [doctest] pyarrow.lib.RecordBatch.add_column
_________________
2861 >>> import pyarrow as pa
2862 >>> import pandas as pd
2863 >>> df = pd.DataFrame({'n_legs': [2, 4, 5, 100],
2864 ... 'animals': ["Flamingo", "Horse", "Brittle
stars", "Centipede"]})
2865 >>> batch = pa.RecordBatch.from_pandas(df)
2866
2867 Add column:
2868
2869 >>> year = [2021, 2022, 2019, 2021]
2870 >>> batch.add_column(0,"year", year)
Differences (unified diff with -expected +actual):
@@ -2,5 +2,5 @@
year: int64
n_legs: int64
-animals: string
+animals: large_string
----
year: [2021,2022,2019,2021]
```
Here's the same check before and after the upgrade:
[pandas
2.3.3](https://github.com/apache/arrow/actions/runs/21043431508/job/60511139081?pr=48727)
[pandas
3.0.0](https://github.com/apache/arrow/actions/runs/21251665557/job/61163539974?pr=48727)
### 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]