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.

period
Filter by
Sorted by
Tagged with
3 votes
1 answer
54 views

Pandas bug when trying to loc data on a quarter

With a dataframe that has a datetime index, I am used to getting data for quarters with the syntax eg. df.loc["2014-Q1"] to grab the data for the first quarter of 2014 (Jan, Feb, Mar). This ...
Someone1348's user avatar
0 votes
3 answers
50 views

Subtract columns with data of type date in python

I have the next example import pandas as pd data = { 'id_number': ['000001000', '000009795', '000011722'], 'first_date': ['2022-01-08 13:41:00', '2022-11-07 09:16:00', '2022-02-15 12:46:...
danny's user avatar
  • 55
1 vote
1 answer
126 views

Why do I get a difference between two dates in Java? [duplicate]

Period period = new Period(startDate, endDate, PeriodType.yearMonthDay()); int years = period.getYears(); int months = period.getMonths(); int days = period.getDays(); if startDate = May 1, 1975 and ...
user414243's user avatar
-2 votes
0 answers
74 views

Bugs in jodatime?

I'm testing jodatime and found several problems with Period. Are these bugs? Test functions and corresponding input are presented as follows. jodatime version: 2.12.7 @Test public void test1() { ...
Radon's user avatar
  • 1
0 votes
0 answers
19 views

Not able to serialize ZonedDateTime,PeriodDuration while converting bean to xml

I am using joda time earlier now I have migrated from DateTime(joda) to ZonedDateTime(java.time) also converted Period(joda) to PeriodDuration(java). But as ZonedDateTime and PeriodDuration does not ...
Saurabh Sole's user avatar
0 votes
0 answers
10 views

List Division in Period Folding [duplicate]

I have two lists of x and y values, respectively (~200k coordinate pairs total) representative of a sinusoidal wave. It's period ends at the 300th coordinate point; I've been tasked with dividing the ...
user23849637's user avatar
1 vote
2 answers
52 views

Validate pandas.Period with Pandera schema

I have a dataframe with a column "Period" which should have a dtype of pandas.Period. I would like to validate this, using a Pandera Schema (either DataFrameModel or DataFrameSchema). My ...
Andy's user avatar
  • 31
0 votes
0 answers
16 views

The average results are calculated differently by the same average measure in the DAX for different time periods

I am comparing the average of daily-rates between two time periods. However, Ave_#curr gave me the average of all rates, and Ave_#prev gave me the divided results of the numerator sum over the ...
newlearner101's user avatar
0 votes
1 answer
42 views

How to migrate Joda time Period API to Java time (java 8)?

I want to migrate JODA time period API to JAVA time (java 8). Joda time period API supports both time and date.eg. It supports from milliseconds to year. But in java.time we have 2 separate ...
Saurabh Sole's user avatar
0 votes
1 answer
80 views

Excel: Proportional monthly distribution of sample values over a time period spanning different months

I am trying to get my head around an MS excel formula for a scenario I have. I am recording discharges over various sample periods. These sample periods will last anywhere from 24 hrs to 1 week. The ...
ETP's user avatar
  • 3
1 vote
4 answers
83 views

How to split datetime period data into monthyear based on unique values in a column in R

I have a series of receivers that were deployed for various periods. The dataset looks like this: Receiver start_dt end_dt 1 2021-05-19 15:43:00 2022-06-19 12:43:00 2 2021-08-19 15:43:00 2022-05-10 ...
fishlakeslimno's user avatar
0 votes
0 answers
15 views

Finding the period-over-period difference across entire dataset [duplicate]

I'm working with a quarterly dataset where I want to return the difference between each period. idx items period metric 1 metric 2 0 Item A 2022-12-31 68 ...
ChrisLK's user avatar
1 vote
1 answer
264 views

Line chart tooltip over all periods

I have a 'Costs' tab in Power BI, which contains a matrix with Account in the rows and Amount as values. These values are controlled by a period slicer on the same tab. For example, the Bank Costs ...
Mathie88's user avatar
0 votes
0 answers
32 views

CPU utilization by module for a given period

My Requirement - Find the CPU utilization by a module for a given period. I am using following 2 queries, which are calculating the CPU utilization for a module say XModule less than 1% for last 24 ...
Aklank Diwaker's user avatar
4 votes
2 answers
86 views

Extract the overlaps of time intervals for the calculation of availabilities

I have a dataset on malfunction times. The start of the malfunction is the Begin column and the end is the End column. In addition there are 3 malfunction categories, which can also overlap in time. ...
TobKel's user avatar
  • 1,367
0 votes
0 answers
128 views

Period finding in Shor's Algorithm

I'm currently working through the book "Quantum Machine Learning with Python Using Cirq from Google Research and IBM Qiskit" and im at shor's algorithm, more precise at the period finding. ...
Felix's user avatar
  • 41
0 votes
0 answers
23 views

Create a daily freq Period / PeriodIndex object in a pandas dataframe for a "broken" year

So, i've got this dataframe: test_df = pd.DataFrame(data={'Season':['1996-97', '1997-98', '1998-99', '1999-00', '2000-01', '2001-02', '2002-03','2003-04','2004-05', '2005-06','2006-07','2007-08', '...
felipedmc's user avatar
0 votes
0 answers
42 views

Creating Pandas Period for the current quarter hour

It is straightforward to create a Period object for the current basic unit of time, such as second, minute, hour, day, week, month, quarter, or year: >>> pd.Period.now("T") Period('...
eumiro's user avatar
  • 210k
1 vote
2 answers
37 views

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 ...
Martin D's user avatar
0 votes
0 answers
15 views

woocommerce subscritpions : enable early renewal

I'm looking for a way to enable early renewal option for subscriptions that are in free trial period using the WooCommerce Subscriptions extension. By default, it's not possible. (and I don't ...
Johann's user avatar
  • 1
0 votes
0 answers
20 views

I have a lot of time series, how do I use Matlab's power spectrum to find the significant (p<0.05) periods of each series

It seems that "periodogram" function can not give dominant period value directly. Can some functions give dominant period value directly? I want to find the significant (p<0.05) cycle of ...
Hao Wu's user avatar
  • 1
0 votes
1 answer
59 views

Cut a period out of another period

I am having difficulties accomplishing a task with MSSQL. I have two tables with periods (begin and end). For example: Table 1 (ID, begin, end): A - 01/01/2023 - 31/10/2023 B - 01/01/2023 - 31/03/2023 ...
chaot's user avatar
  • 3
1 vote
2 answers
52 views

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 (...
Ferran's user avatar
  • 25
0 votes
1 answer
75 views

Splitting overlapping date periods and add them as new periods

I have an array of objects with a start date and an end date. Example: var periods = [ { id: "Period1", startDate: new Date("2022-08-29"), endDate: new Date("...
Jasper De Smet's user avatar
0 votes
0 answers
45 views

Recurring periods in java

In java application i have to specify recurring periods just like we schedule recurring meetings in outlook. Some examples are Recurring every Monday from 10:30 to 12:00 Recurring every Sunday from 23:...
Jomy's user avatar
  • 33
1 vote
0 answers
46 views

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 ...
adleraa's user avatar
  • 11
0 votes
1 answer
594 views

Getting data from current date and same date last year

I spent some hours searching and coding but i am not able to find a solution. I have a table with dates (format yyyy-mm-dd) and payment value. Each row after agregating has only one date e related ...
Alex's user avatar
  • 3
3 votes
1 answer
73 views

Unexpected behavior when adding and substracting Periods from Dates

I was experiencing some unexpected behaviors when doing date/time calculations. When it comes to daylight savings or leap years, the order of operations (months/days/hours) does matter, which is ...
Florian's user avatar
  • 31
1 vote
2 answers
50 views

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....
James King's user avatar
1 vote
2 answers
68 views

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 ...
Pharmepi's user avatar
1 vote
1 answer
161 views

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 ...
CSE's user avatar
  • 73
3 votes
2 answers
102 views

How can I extract information from the string returned in Period.between()? (Kotlin)

For example, I'd have two dates as expected in the function. val period = Period.between(date1, date2) What is returned is a String like this "P*y*Y*x*M*z*D" where y is the year, x is the ...
berry's user avatar
  • 43
2 votes
1 answer
160 views

Period between LocalDates produces wrong results

I see that java.time.Period with java.time.LocalDates works mostly as desired and I can use it to get the duration between two dates in years, months and days but I found an example that is not ...
prom85's user avatar
  • 17.4k
-5 votes
1 answer
143 views

What does a period do between a variable and an array? [duplicate]

I'm learning C and trying to understand what the period "." is doing with the variables x and a; what is this operation called, and what does it do? Here is the full code: #include <stdio....
Kevin Freiges's user avatar
0 votes
1 answer
50 views

Find all specified periods that fit into a certain date range

Suppose I have a certain defined range of dates, e.g. 2022-12-25 to 2023-02-05. I want to find all fully closed periods (specified by the user) that fit into this date range. For example, if the user ...
Droid's user avatar
  • 514
0 votes
1 answer
24 views

How can I determine during which period of the day my record was made?

In my dataset I have a parameter called visit_datetime. This parameter determines during which period the participant visited the researcher. This can be at any time a day. I want to give a value &...
Researchervo's user avatar
1 vote
0 answers
136 views

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....
Wissam96's user avatar
1 vote
1 answer
115 views

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 ...
user1267983's user avatar
0 votes
1 answer
50 views

Creating averages across time periods

I'm a beginner to R, but I have the below dataframe with more observations in which I have at max each 'id' observation for three years 91, 99, 07. I want to create a variable avg_ln_rd by 'id' that ...
lex_022's user avatar
3 votes
1 answer
89 views

How can I get daily login user number?

I have a logged_log table, the table have username, login_time and logout_time column. I need to count daily login user. Table structure: column name type username varchar(32) login_time datetime ...
黃梓榆's user avatar
0 votes
3 answers
510 views

t-sql get all period of date from a date, a periods and a number of periods

I have a SQLServer table with the columns : a date, a period, and the number of period. And i want to get the dates in every period of month. Sample in my first line i have : Date : 25/01/2020 Period ...
MoonLightFlower's user avatar
2 votes
1 answer
157 views

Split intervals by overlap into all periods and get maximum score

Given two timelines, A and B, where each timeline consist of non-overlapping periods and a score is associated with each period. I want to find all the periods and maximum score for the overlap ...
Atoqaz's user avatar
  • 45
0 votes
2 answers
43 views

Display Data between Dec Y-1 and Dec current Y in PowerBI

I am new in powerBI, I loonking to display data in during a closing period and in my case it is from : 31/12/Y-1 to 31/12/Y my issue it is with slicer the year filter all date in the current year and ...
Aarcko's user avatar
  • 11
0 votes
2 answers
77 views

Creating a time period of top values from a python dataframe

I have this dataframe: Date Name Sum 2022-12-01 James 10 2022-12-01 Tom 4 2022-12-03 James 5 2022-12-04 Adam 8 where i want to group the top names by their sum during a 7 day period (every week ...
Mash's user avatar
  • 5
0 votes
2 answers
54 views

TSQL, break period by Month only for given year

I'm trying to break membership periods by month, but only for given year, in our example it 2022 Self inclusive code below works fine but it breaks all period, I only trying to process by month for ...
Mario Trento's user avatar
0 votes
1 answer
5k views

How to set retention period in AWS S3

I am trying to set retention period in S3 storage, in a shell script: curl -k -X PUT $ENDPOINT -H "Content-Type: application/xml" -H "Accept: application/xml" -d "<Request&...
Anders's user avatar
  • 21
3 votes
2 answers
863 views

How to set a pandas PeriodIndex with yearly frequency?

I am able to create quarterly and monthly PeriodIndex like so: idx = pd.PeriodIndex(year=[2000, 2001], quarter=[1,2], freq="Q") # quarterly idx = pd.PeriodIndex(year=[2000, 2001], month=[1,...
Luca Guarro's user avatar
  • 1,108
0 votes
1 answer
582 views

Problem about using talib to generate MACD dataframe using different period sets

import yfinance as yf import pandas as pd import talib code = '2800' para_dict = { 'sample_period_list': [200], 'fastperiod_list': [12, 16], 'slowperiod_list': [26, 30], '...
Ho Chuen Cheung's user avatar
1 vote
3 answers
927 views

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 ...
user3778549's user avatar
0 votes
1 answer
69 views

Power Bi : visualization problem with year over year change

I have created a visualization that gives me the percentage change in the number of sales from one year to the next. This visualization varies according to a date filter. I have data since March 1st ...
Alex's user avatar
  • 59

1
2 3 4 5
11