-2

Question is pretty self-explanatory. I am finding that pd.to_datetime isn't changing anything about the object type and using pd.Timestampe()directly is bombing out.

Before this is marked a duplicate of Converting between datetime, Timestamp and datetime64, I am struggling at changing an entire column of a dataframe not just one datetime object. Perhaps that was in the article but I didn't see it in the top answer.

I will add that my error is occurring when I try to get unique values from the dataframes column. Is using unique converting the dtype to something unwanted?

Mark
  • 934
  • 1
  • 10
  • 25
  • 2
    Unfortunately your problem is not clear. Please see [how to create good pandas examples](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) and create a [mcve] for your question – G. Anderson Jul 02 '19 at 21:33

1 Answers1

1

The method you mentioned pandas.to_datetime() will work on scalars, Series and whole DataFrame if you need, so:

dataFrame['column_date_converted'] = pd.to_datetime(dataFrame['column_to_convert'])
Mark
  • 934
  • 1
  • 10
  • 25