What is the dtype at the last line here in the output, i am confused -
df.dtypes
#A int64
#B bool
#C object
#dtype: object
Here i am only asking about the last line which is 'dtype: object'. I am not asking why it is not str, my question is what is this line for?
df.dtypes
returns aSeries
with each column name as index and the dtype as value. When pandas displays Series is also displays the overall type of the Series below it, which is what you see here (astype
areobjects
).This is the value of
df.dtypes.dtype
.Example:
Why there is an extra line in the display
Why the dtype is
object