Questions tagged [period]

A period of time is an interval, a span of time. You can also use it for questions related to the actual punctuation mark.

508 questions
1
vote
1 answer

Time period in Objective-C

Doing a small project I have received some Java code that I should rewrite into Objective-C(for iPhone to be precise). I came across this piece of code: public class Period { private org.joda.time.Period jodaPeriod; public…
Novarg
  • 7,390
  • 3
  • 38
  • 74
1
vote
2 answers

How to change the view of a dataframe filled with numpy array to better describe a period

I work in the context of the supply chain. I'm trying to set deliveries. The date of receipt and the quantity delivered of the deliveries can be stochastic (advance, delay in relation to the fixed date and breakage or error in entering the…
Martin D
  • 43
  • 5
1
vote
2 answers

How to find how the values have changed from the begining of their period?

I have a dataframe with timeindex. There is a period (cycle) that starts every august. I want to calculate the difference between the value of each month and the value that was on the previous august (the beginning of its period). The aim is to know…
Ferran
  • 13
  • 3
1
vote
0 answers

Finding periodic patterns from several systems in a combined eventlog

I am working on some security analysis tools for network traffic in industrial control systems. I've hit a wall with my algorithmical abilites and would greatly appreciate some ideas. A generalized description of the problem: Assume there are X…
adleraa
  • 11
  • 2
1
vote
2 answers

How can I vectorize a for-loop running over a pandas Periodindex where I need to sort datetimes into appropriate period?

I have a Dataframe "timeseries" which has datetimes as its index and I have a PeriodIndex "on": import numpy as np import pandas as pd timeseries = pd.DataFrame( index=pd.DatetimeIndex( [ "2000-01-01…
James King
  • 13
  • 4
1
vote
2 answers

How to create and count periods of continuous sequences between numbers

I have a dataset containing columns for the ID of an individual (enrolid), a start number (start), an end number (end). I want to create a person-period level dataset of all continuous periods, where a continuous period defined as instances when the…
Pharmepi
  • 21
  • 2
1
vote
1 answer

Converting Total Months to Days Showing Wrong Result

I want to make an age calculator. What I want here is to show the current age and convert that age to total months and days and convert those whole months and days together to total days. But, I am not getting the correct result here. I get…
CSE
  • 73
  • 6
1
vote
0 answers

Athena SQL join Query not working as written

I am creating a query from a table that has different time periods. I am trying to connect them based on when the charge was created. The table has multiple IDs since each ID can have multiple periods. Below you may find the closest join that I was…
1
vote
1 answer

Pandas resample aggregation, intra month periods?

I'm trying to aggregate some data across periods using resampling and so far have something like this: Data: val1 val2 val3 ... date 2022-01-29 0.01 0.08 0.03 2022-01-30 0.04 -0.07 0.02 2022-01-31 0.09 -0.01 0.01 2022-02-01…
user1267983
  • 93
  • 1
  • 9
1
vote
3 answers

How can I parse ISO 8601's "PnDTnHnMn.nS" format in C#/.NET?

I have a date value in windows console application like this one "P0Y0M0DT23H43M52.103S", and I want to parse this datetime value in c# to get minutes out of datetime value. It is easily done in Java by using new…
1
vote
1 answer

How to get the duration time

I have departure time - 02:00, arrival - 06:15, and on the way - "on the way 4h 15m". I want to calculate whether the travel time is counted correctly HTML
02:00
on the way…
EYE
  • 13
  • 2
1
vote
1 answer

Add one year to period index

I have this data: df = pd.DataFrame({Period('2017-01-01', 'D'): 319.8333333333333, Period('2017-01-02', 'D'): 241.20833333333334, Period('2017-01-03', 'D'): 226.75, Period('2017-01-04', 'D'): 217.60416666666666, Period('2017-01-05', 'D'):…
Chris
  • 2,019
  • 5
  • 22
  • 67
1
vote
3 answers

How to deserialize ISO8601 duration string to Duration and Period objects with Jackson

I have a string value containing ISO8601 duration string (P3Y6M4DT12H30M5S). How to deserialize it to Duration and Period object using Jackson ? I know that Duration accepts days, hours, minutes, seconds and Period years and months.
treekt
  • 147
  • 1
  • 12
1
vote
1 answer

How do I split time periods by 5 minute breaks (00:00, 00:05, 00:10, ...)?

I have a a number of periods which I would like to split by 5 minute intervals (00:00, 00:05, 00:10, 00:15, ...), if they span across such 5 minute intervals. How do I turn periods_raw <- read.table(header=TRUE, text=" COLOR …
Benisburgers
  • 352
  • 4
  • 17
1
vote
2 answers

Fill month gaps based on multiple columns and aggregate data

I need to aggregate data on a monthly basis and also fill the gaps of months for the whole year with 0 Amounts. The problem is that the aggregation must happen on multiple columns and this makes it tricky (i.e. using date table and left join does…
nesisekasi
  • 13
  • 3