pyarrow.bool8#
- pyarrow.bool8()#
Create instance of bool8 extension type.
- Returns:
- type
Bool8Type
- type
Examples
Create an instance of bool8 extension type:
>>>importpyarrowaspa>>>type=pa.bool8()>>>typeBool8Type(extension<arrow.bool8>)
Inspect the data type:
>>>type.storage_typeDataType(int8)
Create a table with a bool8 array:
>>>arr=[-1,0,1,2,None]>>>storage=pa.array(arr,pa.int8())>>>other=pa.ExtensionArray.from_storage(type,storage)>>>pa.table([other],names=["unknown_col"])pyarrow.Tableunknown_col: extension<arrow.bool8>----unknown_col: [[-1,0,1,2,null]]
On this page

