Suppose I have a column that contains object which contains float(like this "12.45"). How can I check if this column exists in panda data frame. I want to find this column first and convert all of it's values into float. In another words how can I look for the columns that have objects containing numeric values like floats "12.54". I do not want to look for the objects that contain non numeric values like "cat" or "dog"
for example:
import pandas as pd
df = pd.DataFrame({"column1":[ "12.44", "56.78", "45.87"],
"column2":["cat", "dog", "horse"]})
I want to check if column1 exists in my columns in order to convert all of it's values to float