我在 pandas 中有一个数据框,我正在尝试找出它的值的类型。我不确定列 'Test'
的类型是什么。但是,当我运行 myFrame['Test'].dtype
时,我得到了;
dtype('O')
这是什么意思?
最佳答案
意思是:
'O' (Python) objects
Source .
The first character specifies the kind of data and the remaining characters specify the number of bytes per item, except for Unicode, where it is interpreted as the number of characters. The item size must correspond to an existing type, or an error will be raised. The supported kinds are to an existing type, or an error will be raised. The supported kinds are:
'b' boolean
'i' (signed) integer
'u' unsigned integer
'f' floating-point
'c' complex-floating point
'O' (Python) objects
'S', 'a' (byte-)string
'U' Unicode
'V' raw data (void)
另一个 answer如果需要帮助检查 type
s.
关于python - Pandas 中的 dtype ('O' ) 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37561991/