Pandas : TypeError: float() argument must be a string or a number
A solution which keeps the date(time) column:
data['date'] = pd.to_numeric(pd.to_datetime(data['date']))
IIUC you need exclude column date
also:
columns = [c for c in columns if c not in ["test", 'date']]
because error:
TypeError: float() argument must be a string or a number, not 'Timestamp'