After importing using urlib
, Internet data, I can create a DataFrame (df)
with two columns (Fecha y Valor)
of the types:
Fecha 1563 non-null object,
Valor 1563 non-null object.
With the statement df["Fecha"] = pd.to_datetime(df["Fecha"])
I can pass the values of the column Fecha
, to the format Fecha 1563 non-null datetime64[ns]
Next I try to change the format of the column valor
with the statement df["Valor"] = pd.to_numeric(df["Valor"])
and I get the error:
ValueError: Unable to parse string "185,130000" at position 0.
I try again with the df['Valor'] = df['Valor'].apply(np.float)
statement and it gives me the error:
ValueError: Unable to parse string "185,130000" at position 0
What else could I do?