wenjun93 commented on issue #43298:
URL: https://github.com/apache/arrow/issues/43298#issuecomment-2441085156
hit the same issue, an example stack trace given below, @raulcd
@jorisvandenbossche
```
problematic column:
>>> df['col1']
0 [(, 10)]
1 [(, 4), (en, 11)]
2 [(, 4), (en, 3)]
3 [(, 40), (en, 5)]
4 [(, 19)]
......
Name: col1, Length: 1000, dtype: object
stack:
File "/dev/lib/python3.8/site-packages/pandas/core/frame.py", line 2889,
in to_parquet
return to_parquet(
File "/dev/lib/python3.8/site-packages/pandas/io/parquet.py", line 411, in
to_parquet
impl.write(
File "/dev/lib/python3.8/site-packages/pandas/io/parquet.py", line 159, in
write
table = self.api.Table.from_pandas(df, **from_pandas_kwargs)
File "pyarrow/table.pxi", line 4525, in pyarrow.lib.Table.from_pandas
File "/dev/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line
611, in dataframe_to_arrays
arrays = [convert_column(c, f)
File "/dev/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line
611, in <listcomp>
arrays = [convert_column(c, f)
File "/dev/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line
598, in convert_column
raise e
File "/dev/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line
592, in convert_column
result = pa.array(col, type=type_, from_pandas=True, safe=safe)
File "pyarrow/array.pxi", line 345, in pyarrow.lib.array
File "pyarrow/array.pxi", line 85, in pyarrow.lib._ndarray_to_array
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowTypeError: ("Expected bytes, got a 'int' object",
'Conversion failed for column col1 with type object')
```
--
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]