0

what's up?

In excel i could transform an entire column of dates or string in number using number_value formula. Can I do something like this in Python with pandas at on my dataFrames?

Tks

1 Answers1

0

The code below should transform string values to a numeric value. The first line is only needed if you are transforming dates from a string to a number.

df['col'] = pd.to_datetime(df['col'])
df['col'] = pd.to_numeric(df['col'])
rhug123
  • 7,893
  • 1
  • 9
  • 24