Allow me to ask again this question, as answers found on the forum did not help me so far.
I am trying to convert a column from 'string' into 'numerical' data type.
The column has no missing values and no errors, it comes from a CSV file. For the record, I tried modifying the format type of the column on the CSV file and saving it as a number, but later when importing the CSV file on Azure ML it was coded as a string.
So far, I have tried the following options:
import pandas as df
def azureml_main (df):
df.age=pd.to_numeric(df.age,errors=’coerce’)
return df