1

I have a pandas Series with multiple formats of months as well as multiple separators. How do I convert it to Time stamp in pandas using pandas.strftime()?

Suppose our date series as

April 11, 1990
May 30, 2001
October. 11, 2013
Mar. 10, 1976
June 15, 1972
January 07, 1991

Which we want to be

04/11/1990
05/30/2001
10/11/2013
03/10/1976
06/15/1972
07/01/1991

I tried by removing each extra character by looping through the data frame and truncating the month name which was highly inefficient.

L_J
  • 2,241
  • 10
  • 22
  • 27
Himanshu Poddar
  • 3,438
  • 5
  • 34
  • 67

0 Answers0