When using the idxmax() function in Pandas, I keep receiving this error.
Traceback (most recent call last):
File \"/Users/username/College/yea
The type of the cell values are, by default, non-numeric. argmin(), idxmin(), argmax() and other similar functions need the dtypes to be numeric.
The easiest solution is to use pd.to_numeric() in order to convert your series (or columns) to numeric types. An example with a data frame df with a column 'a' would be:
df['a'] = pd.to_numeric(df['a'])
A more complete answer on type casting on pandas can be found here.
Hope that helps :)