ToArrow¶
- class lsst.daf.butler.arrow_utils.ToArrow¶
- Bases: - ABC- An abstract interface for converting objects to an Arrow field of the appropriate type. - Attributes Summary - Arrow data type for the field this converter produces. - Arrow field this converter produces. - Name of the field. - Whether the field permits null or - Nonevalues.- Methods Summary - append(value, column)- Append an object's arrow representation to a - list.- Return a new converter with the same name and type, but using dictionary encoding (to 32-bit integers) to compress duplicate values. - finish(column)- Convert a list of values constructed via - appendinto an Arrow array.- for_datetime(name[, nullable])- Return a converter for - astropy.time.Time, stored as TAI nanoseconds since 1970-01-01.- for_primitive(name, data_type, nullable)- Return a converter for a primitive type already supported by Arrow. - for_region(name[, nullable])- Return a converter for - lsst.sphgeom.Region.- for_timespan(name[, nullable])- Return a converter for - lsst.daf.butler.Timespan.- for_uuid(name[, nullable])- Return a converter for - uuid.UUID.- Attributes Documentation - data_type¶
- Arrow data type for the field this converter produces. 
 - field¶
- Arrow field this converter produces. 
 - name¶
- Name of the field. 
 - Methods Documentation - abstract append(value: Any, column: list[Any]) None¶
- Append an object’s arrow representation to a - list.
 - dictionary_encoded() ToArrow¶
- Return a new converter with the same name and type, but using dictionary encoding (to 32-bit integers) to compress duplicate values. 
 - abstract finish(column: list[Any]) Array¶
- Convert a list of values constructed via - appendinto an Arrow array.
 - static for_datetime(name: str, nullable: bool = True) ToArrow¶
- Return a converter for - astropy.time.Time, stored as TAI nanoseconds since 1970-01-01.
 - static for_primitive(name: str, data_type: DataType, nullable: bool) ToArrow¶
- Return a converter for a primitive type already supported by Arrow. 
 - static for_region(name: str, nullable: bool = True) ToArrow¶
- Return a converter for - lsst.sphgeom.Region.
 - static for_timespan(name: str, nullable: bool = True) ToArrow¶
- Return a converter for - lsst.daf.butler.Timespan.