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
0
votes
1 answer

Finding periods of a plot

I've constructed a figure containing 3 different plots representing a position of 3 different masses over some time range. I want to find the period of each. I'm not familiar with the FFT function that I've come across while searching for ways to…
0
votes
1 answer

How to access index value in a apply/lambda function when index is a PeriodIndex?

When accessing the index value in apply/lambda combination, I use name parameter. But in the case of a period index, it doesn't seem to work. In below code, I am computing the completion rate at a given row, considering periods of 4 hours. import…
pierre_j
  • 895
  • 2
  • 11
  • 26
0
votes
1 answer

How assign a qualitative value (flight/feeding) in a column (localization) to some time periods (rows)

I would like to fill a column with localisation information (flight / perched / feeding) dependent on the time. For example, from 13:16:11 to 13:18:32 I know that the bird is flying so I want to put "flight" on the localization column for this…
0
votes
0 answers

How do I generate a one-year period based on the current date?

I want to generate a period based on the current date. For Example: Input: 2020-03-10 08:54:23 Output: 01 Apr 2020 - 31 Mar 2020 My way: Part 1 (from): get first day of next month get next month if actual month December, update also year.…
Cello
  • 31
  • 1
  • 1
  • 7
0
votes
1 answer

Is it possible to create a dynamic period based on a date?

I am doing an analysis of ex-clients using key data points such as website conversion rate. For each data point I want to see the value of the data point (e.g. conversion rate) for the 6 month period prior to their cancellation date. Using the…
0
votes
1 answer

MySQL : the average time of the runners of a race

Maybe i don't use the right words but i don't find a solution with the search box. i have a race with a lot of runner. Each runner have done 7/12 laps. I have one record by laps by runner. For example : +------+-----------+---------------------+ |…
0
votes
2 answers

Program in JAVA to calculate age of person from birthdate and current date

This code will accept from the user the current date, month, and year; and their birth date, birth month, birth year. It outputs the age of the person in years, months and days. The code as I have written it does its job. I have cross-checked with a…
Riley Jones
  • 43
  • 1
  • 8
0
votes
2 answers

Getting the age in months using Java Time API

I wrote what I thought would be simple time API call to get the amount of months and years between two LocalDates. However, when I am doing my tests the numbers do not seem to be computing…
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
0
votes
2 answers

Period.between does not include the last day in Java

Period difference = Period.between(01.01.2018,31.01.2018) difference.getMonths() gives zero and difference.getDays() gives 30 days, anyway to include the last day ?
Parameswar
  • 1,951
  • 9
  • 34
  • 57
0
votes
2 answers

Outputting if the 10 day period is finished

I want to write a bash script that determines the 10 day period (decade) has ended relative to the start date (in the format YYYY-MM-DD). If the 10 day period is finished script has to output the 10 days period. Im new in bash and has a lot syntax …
Vadim
  • 753
  • 8
  • 22
0
votes
0 answers

More control over Dialogflow's date period

I'm trying to get Dialogflow to report sales in different time periods. When I ask things like what's the sale last month what's the sale in march 2011 They work fine. However, if I didn't specify "last" or year, Dialogflow always think I'm asking…
Art
  • 453
  • 4
  • 12
0
votes
1 answer

Move Files in Powershell

Using the code below as a base (from another question) how can I move files between 2 dates eg : >2wks AND < 13 Months to another location. Also is it possible to restrict the file extension to be moved? get-childitem -Path "E:\source" | …
Darryl Wilson
  • 1,679
  • 2
  • 11
  • 7
0
votes
0 answers

Creating 10min periods from time column for each class separately in python

I need to create periods and named them like 0,1,2,3 according to time column, for each class in dataframe separately I have already tried df = df.set_index(pd.DatetimeIndex(df['time'])) newdf =…
0
votes
1 answer

In R: How to extract info about valid time periods and apply it to another dataset?

I have to datasets, that I want to combine: Dataset 1: Contains time periods for which "perc" is valid: set.seed(1) example_df <- data.frame(ID = rep(1:2, each=2), start = c(as.Date("2014-01-01"), as.Date("2014-03-05"), as.Date("2014-01-13"),…
user138089
  • 99
  • 1
  • 5
0
votes
1 answer

Select a time period by day and month

I have a dataframe organized by year. For example: date <- seq(as.Date("2001-07-20"),as.Date("2010-12-31"),by = 1) Now I want to select a subset by using two time periods: June 23 to July 13 AND July 20 to Aug 9 for 2004-2008. Could you provide…
Bob
  • 35
  • 4