I have dataframe with many columns, some of them are strings and some are numbers. Right now when I print the columns names as list I get something like this:
df.columns.tolist()
>>>['name','code','date','401.2','405.6','507.3'...]
I would like to get the numerical columns as float numbers and not as string, I haven't found yet any way to do that, is is possible to do something like this? my goal in the end is to be able to create list only of the numerical columns names, so if you know other way to seperate them now when they are string could work also.