I am new to pandas.
I have a column with the object dtype that contains floats and strings.
I would like to count the number of each in the column.
I figured out a way to do it:
len([v for v in list(df["ColumnA"]) if type(v)==float])
len([v for v in list(df["ColumnA"]) if type(v)==str])
But is there a more direct way to do this?
Ideally, I'd prefer to be able to do something like:
df["ColumnA"].dtypes
and have the output be:
float: 103,544
str: 2,767