-2

I have a csv data set want to convert the text to numeric , are their any function can used or using excel function ? I tried to convert the data frame using pd.to_numeric(x,errors='coerce'.isnull()) and that not work also a tried to use data['MainCategory'] = data['MainCategory'].astype(float)

1 Answers1

0

In python: yourString = float(yourString)

In VBA:

yourString = CDbl(yourString)

if you're trying to convert "two" to the int 2 there is a good example here: Is there a way to convert number words to Integers?

Wilco
  • 374
  • 1
  • 11