INNER CODE UNIT · Python
_convert_object_to_arrow
briscverse/ryp · ryp.py:1005
def _convert_object_to_arrow(python_object: Any,
python_object_description: str,
is_pandas: bool = False,
is_polars: bool = False) -> Any:
"""
Converts 1D data with object dtype to Arrow (or to complex, if complex).
Args:
python_object: a 1D NumPy array, pandas Series or Index, or polars
Series with dtype=object or dtype=pl.Object
python_object_description: a description of python_object
is_pandas: whether python_object is a pandas Series or Index
is_polars: whether python_object is a polars Series
Returns:
python_object, converted to Arrow (or to complex, if complex).
"""
with ignore_sigint():