0

There are several date/time related classes like datetime.date, datetime.datetime, pandas.Timestamp, numpy.datetime64. Are there some general guidelines when to use one over the other in a project?

What are the advantages of each?

Should I avoid using python native datetime objects if I use pandas most of the time?

My use case: I have a project which uses daily financial price data, I use pandas in most functions, but I have also some functions which just use a list of datetime.date. I feel like it would be good to unify my data types for the whole project.

Danny
  • 79
  • 4
  • [Here's a handy chart to show how confusing this is](https://stackoverflow.com/a/21916253/4799172). The answer below, from Panda's creator; "Welcome to hell" :P – roganjosh Dec 04 '17 at 08:25
  • 1
    In fact, I've re-read that thread and there's a new answer from Oct that goes into [a lot of detail](https://stackoverflow.com/a/46921593/4799172). I think it's a suitable dupe target because it really is a messy topic; I imagine the guidelines is try pick through and find what is most suitable for you. – roganjosh Dec 04 '17 at 08:50

0 Answers0