我想知道pandas.DataFrame.dtypes返回的所有可能数据类型的列表
(A)根据https://pbpython.com/pandas_dtypes.html,以下是熊猫中所有可能的数据类型:
对象,int64,float64,bool,datetime64,timedelta,类别
(B)This SO answer谈论熊猫支持更多种类的数据类型,包括PeriodType、CategorialdType等
(A)表示所有可能的数据类型,而“object”负责所有未指定的附加数据类型(即,包括(B)中的数据类型),这样说是否正确
https://pandas.pydata.org/docs/user_guide/basics.html#dtypes
这将为您提供所需的信息。TL-DR;pandas通常支持这些numpy数据类型-
float, int, bool, timedelta64[ns], datetime64[ns]
,除了泛型object
数据类型之外,泛型object
数据类型是一种通用类型然而,pandas引入扩展数据类型已有一段时间了
否,
object
主要用于字符串列或混合类型的列。较新的ExtensionType似乎类似于np.dtypes
https://pandas.pydata.org/docs/development/extending.html#extending-extension-types
相关问题 更多 >
编程相关推荐