1 回答

TA貢獻(xiàn)1776條經(jīng)驗(yàn) 獲得超12個(gè)贊
據(jù)我所知這是不可能的。屬于不直接公開其底層成員的logical_type類型。pyarrow._parquet.ParquetLogicalType
唯一可用的字段是:
dir(logical_type)
>> ['__class__',
'__delattr__',
'__dir__',
'__doc__',
'__eq__',
'__format__',
'__ge__',
'__getattribute__',
'__gt__',
'__hash__',
'__init__',
'__init_subclass__',
'__le__',
'__lt__',
'__ne__',
'__new__',
'__pyx_vtable__',
'__reduce__',
'__reduce_ex__',
'__repr__',
'__setattr__',
'__setstate__',
'__sizeof__',
'__str__',
'__subclasshook__',
'to_json',
'type']
您可以使用該to_json功能,但它與您建議的選項(xiàng)一樣臟:
import json
json.loads(logical_type.to_json())['isAdjustedToUTC']
>> true
- 1 回答
- 0 關(guān)注
- 170 瀏覽
添加回答
舉報(bào)