ArrowNumpySchema

class lsst.daf.butler.formatters.parquet.ArrowNumpySchema(numpy_dtype: np.dtype)

Bases: object

Wrapper class for a schema for a numpy ndarray.

Parameters:
numpy_dtypenumpy.dtype

Numpy dtype to convert.

Attributes Summary

schema

Methods Summary

from_arrow(schema)

Convert an arrow schema into an ArrowNumpySchema.

to_arrow_astropy_schema()

Convert to an ArrowAstropySchema.

to_arrow_schema()

Convert to a pyarrow.Schema.

to_dataframe_schema()

Convert to a DataFrameSchema.

Attributes Documentation

schema

Methods Documentation

classmethod from_arrow(schema: Schema) ArrowNumpySchema

Convert an arrow schema into an ArrowNumpySchema.

Parameters:
schemapyarrow.Schema

Pyarrow schema to convert.

Returns:
numpy_schemaArrowNumpySchema
to_arrow_astropy_schema() ArrowAstropySchema

Convert to an ArrowAstropySchema.

Returns:
astropy_schemaArrowAstropySchema
to_arrow_schema() Schema

Convert to a pyarrow.Schema.

Returns:
arrow_schemapyarrow.Schema
to_dataframe_schema() DataFrameSchema

Convert to a DataFrameSchema.

Returns:
dataframe_schemaDataFrameSchema