Skip to main content
4 votes
1 answer
139 views

I encountered this behaviour and I figured I would ask the correct way to go about it. Here is a toy example: pre_timechange = datetime.datetime(2025, 11, 2, 1, 59, 9, tzinfo=zoneinfo.ZoneInfo(key='...
SomeGuy's user avatar
  • 61
-2 votes
1 answer
66 views

Is it possible to have the units argument for the timedelta function be defined by a variable? To elaborate, is this possible? Time_Unit = "days" Time_Increment = 1 Time2 = Time1 + ...
Jon S's user avatar
  • 63
1 vote
2 answers
186 views

I have datasets from multiple instruments with differing, but hypothetically concurrent datetime stamps. If date from instrument A does not correspond to any data from instrument B within some ...
OceanColorCoder's user avatar
1 vote
2 answers
79 views

I have several numpy timedelta values. I want to convert them to the a format that is better to read for humans without losing information. Let's say I have td = np.timedelta64(10800000000001, 'ns'). ...
AkariYukari's user avatar
0 votes
0 answers
97 views

I am trying to use pyqtgraphs DateAxisItem for relative times on the x axis, i.e., durations (which can be between a few hours and several days). I know I could simply use an ordinary AxisItem and ...
emma's user avatar
  • 337
0 votes
2 answers
474 views

I have been using the following code to determine the latest table using Databricks TimeTravel feature for the past few years without any issues. I recently added a new row to the table that I have ...
Patterson's user avatar
  • 3,021
0 votes
1 answer
87 views

I want to plot precip type from the start of the GFS run (hour 0) through hour 240 at 6-hour intervals. (in this code I only try to go to hour 108) Also, at the end of the code when saving the the ...
Matthew Labenz's user avatar
3 votes
2 answers
204 views

When printing a polars data frame, pl.Duration are printed in a "human format" by default. What function is used to do this conversion? Is it possible to use it? Trying "{}".format(...
Yves Dorfsman's user avatar
2 votes
2 answers
214 views

If I only use datetime.now() with timedelta to calculate deltas, is it safe to ignore time zones? For example, is there a case where if a start time is before daylight savings, and an end time is ...
Salvatore's user avatar
  • 12.6k
1 vote
0 answers
29 views

I'm currently working on a reminder bot project that supports recurring reminders. For example, a user can specify that they want their reminder to repeat in intervals of "3 days", "12 ...
Franco Reyes's user avatar
1 vote
1 answer
83 views

I have a DataFrame like this (date: datetime64[ns], v: float64) date v 2024-09-01 22:09:55 1.2 2024-09-01 22:12:08 1.11 2024-09-01 22:59:59 1.7 2024-09-01 23:00:02 1.1 ...
jigga's user avatar
  • 624
-1 votes
1 answer
64 views

I defined two helper methods in Python for setting start-time and end-time and want it converted into unix timestamp (epoch): def set_epoch_start(): unix_epoch = datetime.utcfromtimestamp(0)....
Magnus Jensen's user avatar
3 votes
0 answers
1k views

How can I fix the warning: FutureWarning: 'T' is deprecated and will be removed in a future version. Please use 'min' instead of 'T'. if median_diff > pd.Timedelta(freq): In the method below it ...
bbartling's user avatar
  • 3,564
0 votes
1 answer
95 views

So I made a JavaScript clone of Flappy Bird. It runs beautifully on my 2021 M1 iMac, almost perfect... It also runs fairly well on my 2023 M2 MacBook Pro, minus some minor glitches. HOWEVER, this is ...
Art Vardanyan's user avatar
2 votes
1 answer
82 views

I am trying to convert timedelta to integer. time = (pd.to_datetime(each_date2)-pd.to_datetime(each_date1)) pd.to_numeric(time, downcast='integer') time has following value: Timedelta('7 days 00:00:...
mona's user avatar
  • 107

15 30 50 per page
1
2 3 4 5
93