Questions tagged [pendulum]

Pendulum is a Python package to ease datetimes manipulation. It provides classes that are drop-in replacements for the native ones (they inherit from them).

67 questions
0
votes
1 answer

Specify dst_rule for ambiguous dates in pendulum.parse

I have to parse time-series data from CSV files in an application. The timestamps sometimes are in locale time with DST transitions. I want to use python-pendulum for the parsing of the date strings. Is it possible to specify the dst_rule when…
cbergmiller
  • 278
  • 1
  • 10
0
votes
1 answer

Pendulum with python for period of time

Trying to run through each day and save as a separate CSV file with pendulum. Right now I am only able to get the first day of the period. Not sure if I need outfile or not but I am assuming I do since I want each separate CSV file to write, close,…
Michael T Johnson
  • 679
  • 2
  • 13
  • 26
0
votes
0 answers

Kalman Filter Pendulum Estimation State

I implemented an easy mathematical model of a pendulum on simulink. I implemented a Kalman filter to estimate the velocity state having as input a zero torque, the initial position set to a certain angle (pi/18) and the initial velocity set to zero.…
-1
votes
1 answer

Double Pendulum returning nan results. Why?

When I run this code the double pendulum shows for a split second and then disappears. It seems most of the variables in the formula, num1, num2, etc., start returning nan after that split second when the pendulum disappears. Can anyone see why? I…
Don
  • 11
  • 2
-1
votes
1 answer

Coding Exercise: Watch the Pendulum

In physics, for a pendulum with length L and initial angle A, its horizontal >displacement X(T) at time T is given by the formula X(T) = L × cos(A × cos(T × √9.8/L)) - L × cos(A) Write a program which takes two lines of input; the first line is L…
xepo
  • 3
  • 1
  • 4
-3
votes
1 answer

How to get the last Wednesday of every month since 2016?

Since I want to get the last Wendnesday of every month, use pendulum.parse but sometimes 4 is last week or 5 is last week. How to get easily the day is last Wendnesday of month or not? enter image description here
Ethan
  • 1
1 2 3 4
5