r-priyam opened a new issue, #37649:
URL: https://github.com/apache/arrow/issues/37649
### Describe the usage question you have. Please include as many useful
details as possible.
I have a `parquet` file where some column values are stored as JSON in
string and I have to use them as JSON when I am performing the operation on the
dataset. I tried using `.cast` but it is not working, details are
below. Please consider the array below as my simple example to do it.
```py
import pyarrow as pa
>>> arr = pa.array(["[{'key': 1}]", None, None])
# When I do:
arr.cast(pa.list_(pa.struct([('key', pa.int64())])))
# It throws traceback
File "pyarrow/_compute.pyx", line 572, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 367, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 144, in
pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unsupported cast from string to list
using function cast_list
```
Any idea how I can do it, please? the last goal is to have an array of
something like this:
`[[{'key': 1}], None, None]`
### Component(s)
Parquet, 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]