Skip to main content
0 votes
1 answer
78 views

I use the following to write CSV lines in a loop while running sensor instrumentation, and I want to read them back in for post-processing without pandas. I would like to use the imported data to ...
onix's user avatar
  • 3
1 vote
1 answer
62 views

I have a Python numpy.ndarray of seconds of the day with a bunch of decimal seconds: import numpy as np sec = [40389.66574375, 40390.12063928, 40391.32714992, 40392.64457077, 40393.48519607, 40394....
Swawa's user avatar
  • 273
7 votes
2 answers
200 views

I am puzzled by an inconsistency when calling .strftime() for dates which are pre-1000 AD, using Python's datetime module. Take the following example: import datetime old_date = datetime.date(year=33, ...
Melipone's user avatar
  • 730
2 votes
1 answer
78 views

A little example: $ python Python 3.13.2 (main, Feb 5 2025, 08:05:21) [GCC 14.2.1 20250128] on linux Type "help", "copyright", "credits" or "license" for more ...
ctmbl's user avatar
  • 23
3 votes
1 answer
84 views

I'm attempting to parse HTML time strings in Python: from datetime import datetime input = "2025-03-24T07:01:53+00:00" output = datetime.strptime(input, "%Y-%m-%d%X%:z") print(...
user avatar
0 votes
1 answer
63 views

In the following code datetime.strptime() is blocking asyncio.Queue.get() operation import time import asyncio from datetime import datetime from functools import partial def write(queue): data =...
Dinesh's user avatar
  • 1,896
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
1 answer
70 views

Input (New York Time in string format) = '2024-11-01 13:00:00' Output (UTC Time in string format) = '2024-11-01 17:00:00'
Alpha Warrior's user avatar
2 votes
2 answers
159 views

I am trying to determine whether a given date string includes all three components: day, month, and year. Example Inputs and Expected Outputs: "2025-01-01" → True (All components are ...
Chinmai Veera's user avatar
0 votes
1 answer
67 views

I have a machine running some scripts that I need to keep an eye on. I have set up a script in python to send me emails using every hour. I would like to add timestamp to it so that I can see at a ...
excelman's user avatar
  • 439
0 votes
1 answer
116 views

When I use .shift() from Pandas on a column in a DataFrame with a date index, I can use it, for example, with .corr(), but I cannot update my old DataFrame or create a new one. Dataset My df looks ...
Mihuu's user avatar
  • 1
1 vote
2 answers
112 views

I'm doing some datetime math in python with the pytz library (although I'm open to using other libraries if necessary). I have an iterator that needs to increase by one day for each iteration of the ...
Pwnosaurus's user avatar
  • 2,206
-1 votes
1 answer
378 views

I have a df datetime column that I want to convert from Europe/Copenhgaen t.z to UTC but I just keep getting duplicate entries in the UTC column. The reason this happens is because of how I make my ...
Tom's user avatar
  • 115
1 vote
1 answer
71 views

I need to plot some patches which requires me to use the matplotlib mdate module (ideally) to have control over the tick markers. I have used mdates before and I can't for the life of me figure out ...
Yolkions's user avatar
  • 111
0 votes
1 answer
58 views

I'm connecting to an API that returns a list of articles, each article has created_at and modified_at properties. I want to return the difference (in hours) between the created_at and modified_at ...
Katie's user avatar
  • 9

15 30 50 per page
1
2 3 4 5
129