I am trying to convert specific columns in my DataFrame to dtype: float. I tried this:
grid[['DISTINCT_COUNT','MAX_COL_LENGTH', 'MIN_COL_LENGTH', 'NULL_COUNT' ]].apply(pd.to_numeric, errors='ignore')
But when I print this afterwards:
print(grid.dtypes)
I am still seeing this:
COLUMN_NM object
DISTINCT_COUNT object
NULL_COUNT object
MAX_COL_VALUE object
MIN_COL_VALUE object
MAX_COL_LENGTH object
MIN_COL_LENGTH object
TABLE_CNT object
TABLE_NM object
DATA_SOURCE object
dtype: object
Any ideas?