Actually I know of no algebra upon which addition and subtraction and *division* is defined but multiplication is not... 
-
-
Python doesn't have a timesquared type so it omits that operator. perhaps this is an argument for actual units but those are complicated
1 reply 0 retweets 3 likes -
Replying to @erincandescent @oshepherd and
Indeed they are. Which is why it would be a lot more semantically rich to provide methods to support the conversions.
2 replies 0 retweets 0 likes -
Eh, I'd still want the division. Dividing periods by each other is useful.
1 reply 0 retweets 1 like -
Replying to @erincandescent @oshepherd and
Sure sure -- I'm not saying *remove* that capability. But .to_hours() should be supported.
1 reply 0 retweets 1 like -
I disagree - then you end up with to_years, to_months, to_weeks, to_days, to_hours, to_minutes, to_seconds, to_miliseconds...
2 replies 0 retweets 1 like -
Replying to @erincandescent @EmilyGorcenski and
It's redundant, and dividing by an hour is exactly how you'd do things mathematically
2 replies 0 retweets 0 likes -
Replying to @erincandescent @oshepherd and
i suspect also this is a combination of "one obvious way to do it" and the fact that expressing a timedelta in hours may not be well-defined
1 reply 0 retweets 0 likes -
Replying to @eevee @oshepherd and
it took until 3.2 just to get a total_seconds method (whose docs still point out that it's equivalent to dividing)
1 reply 0 retweets 1 like -
If expressing a pandas.Timedelta is ever not well-defined, then we still have the issue of mathematical expressing returning nonsense.
2 replies 0 retweets 0 likes
But if that such expression returns nonsense and the math is good, we now have an issue with errors that don't bubble up.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.