What are the possible types of pandas base / scalar data?

I found a list of scalar NumPy types: https://docs.scipy.org/doc/numpy-1.12.0/user/basics.types.html

I know that pandas adds timestamp types to them. Are there any other types? Is there a complete list of pandas scalar types anywhere?

+4
source share
1 answer

Usually (and fluent) speaking pandas columns are simply labeled with numpy arrays and have comparable types. The only exception that I know of is the categorical type pandas.

Here is an example of dtype from white papers . It is not guaranteed to be exhaustive, but as far as I know, it is pretty close.

In [423]: df.dtypes
Out[423]: 
bool1                                   bool
bool2                                   bool
category                            category
dates                         datetime64[ns]
float64                              float64
int64                                  int64
string                                object
uint8                                  uint8
tdeltas                      timedelta64[ns]
uint64                                uint64
other_dates                   datetime64[ns]
tz_aware_dates    datetime64[ns, US/Eastern]
dtype: object

, dtype -, int, float, bool, category datetime/timedelta. dtype python , ..

+2

Source: https://habr.com/ru/post/1680930/


All Articles