What is dtype('O'), in pandas?

前端 未结 4 1110
我在风中等你
我在风中等你 2020-12-02 07:08

I have a dataframe in pandas and I\'m trying to figure out what the types of its values are. I am unsure what the type is of column \'Test\'. However, when I ru

4条回答
  •  情书的邮戳
    2020-12-02 07:52

    It means:

    '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)
    

    Another answer helps if need check types.

提交回复
热议问题