I am trying to using isinstance() at the beginning of a loop to check the type for each column in a data frame.
I have a lot of columns but isinstance universally fails. For example;
test['Total Revenue'].dtypes
returns
dtype('int64')
But using isinstance returns
isinstance(test['Total Revenue'].dtypes, (int, np.integer))
False
isinstance only recognizes my columns as an object
isinstance(test['Total Revenue'].dtypes, object)
True
My gut tells me it has something to do with how isinstance is accessing the value, but I'm stuck