You are confusing categorical data type with strings (pandas shows it as object).
Numbers can't contain $ dollar sign by their nature and because of that pandas consider Salary column as string and this is correct behavior!
You can easily convert your salary column to integer/float if you want though:
In [180]: df Out[180]: Gender Salary 0 F $3283 1 M $6958 2 F $3721 3 F $7732 4 M $7198 5 F $5475 6 F $7410 7 M $8673 8 F $8582 9 M $4115 10 F $8658 11 F $6331 12 M $6174 13 F $6261 14 M $6212 In [181]: df.dtypes Out[181]: Gender object Salary object dtype: object
let's remove leading $ and convert Salary to int:
In [182]: df.Salary = df.Salary.str.lstrip('$').astype(int) In [183]: df.dtypes Out[183]: Gender object Salary int32 dtype: object
and your Gender column to categorical:
In [186]: df.Gender = df.Gender.astype('category') In [187]: df.dtypes Out[187]: Gender category Salary int32 dtype: object
df.dtypesordf.info()?