pandas.Series.struct.dtypes#
- Series.struct.dtypes[源代码]#
返回结构中每个子字段的dtype对象。
- 返回:
- pandas.Series
每个子字段的数据类型。
参见
Series.dtype
Return the dtype object of the underlying data.
示例
>>> import pyarrow as pa >>> s = pd.Series( ... [ ... {"version": 1, "project": "pandas"}, ... {"version": 2, "project": "pandas"}, ... {"version": 1, "project": "numpy"}, ... ], ... dtype=pd.ArrowDtype( ... pa.struct([("version", pa.int64()), ("project", pa.string())]) ... ), ... ) >>> s.struct.dtypes version int64[pyarrow] project string[pyarrow] dtype: object