by iknownothow · 3y ago · 0 comments
To me it's very often easily worth the extra 50-150MB of install size that just works. I've used pandas for around 7 years now and it was inconsistent and buggy at the beginning. But these days, it's practically flawless. Also I'm aware that pd.Timestamp is built on top of many awesome libraries.
When I left Rails, this is one area I really missed.
Time.use_zone("Singapore") { (Time.zone.now - 3.days).beginning_of_week }
This readable line in datetime utils or even pendulum, is such a pain.
Generally every other library works in terms of standard python types where possible. Very few other places will you see things like a re-implementation of a time library.
...and scipy and all the scikit libraries and whole bunch of others. 'Accidentally' pulling in hundreds of MBs of libraries you never use for a 100 line data processing script is par for the course in python land.
... pytz for example ;-)
But you are right that pandas' use of pytz is benign and as far as I know doesn't suffer the same usability issues.
from django.utils import timezone
now = timezone.now()
later = timezone.now() + timezone.timedelta(minutes=1)