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
2 answers

how to decompose a period into a set of subperiods (hour, quarter-hour and minute) in python

I want to split a period into several sub-periods of predefined size. Here is an example: Between 2021-04-11 15:03:00 and 2021-04-11 18:03:00, decompose into hours, quarter-hours and minutes. The expected result is (no specific order): 2021-04-11…
lovelace63
  • 352
  • 1
  • 6
  • 15
1
vote
2 answers

Select a custom date range period to retrieve results from last month day

I have a lot of data with a lot of dates (date begin, date end, date activation etc.). I would like to retrieve those data selecting a specific time range and returning a period date. I want only results where: (last month date) <= Date Activation…
Jonito
  • 407
  • 7
  • 18
1
vote
1 answer

Convert a Period object to Datetime

I would like to convert an object from pandas.core.indexes.accessors.PeriodProperties to a Datetime variable. As an example, I want to convert a period variable (not a string) with the format "2019Q1" to a datetime format, "2019-03-31".
Crypt_Fomo
  • 11
  • 2
1
vote
1 answer

How do I group data by fiscal year in pandas?

I have the following dataframe containing financial data for a company which has its fiscal year from 1 March to the last day of February. The real dataframe covers multiple fiscal…
Bandit King
  • 183
  • 10
1
vote
3 answers

ggplot2 comparation of time period

I need to visualize and compare the difference in two equally long sales periods. 2018/2019 and 2019/2020. Both periods begin at week 44 and end at week 36 of the following year. If I create a graph, both periods are continuous and line up. If I use…
Eischias
  • 25
  • 5
1
vote
1 answer

What is the use of Periods in pandas

I was going through the Periods in pandas and couldnt find any particular use for it and i dont think it is any different from the date, for instance To get the datetime, I use datetime(2012,1,1) To get a range of dates, I…
Lijin Durairaj
  • 4,910
  • 15
  • 52
  • 85
1
vote
2 answers

PHP DatePeriod before and after midnight with time only without date

I need to find 15 minute intervals between two times without date it all works fine if both times are before 00:00. I am passing times like: 17:00, 23:00 and 01:30. After midnight is the problem of course it is another day so this is the reason it…
Abu Nooh
  • 846
  • 4
  • 12
  • 42
1
vote
0 answers

TimeWindows Plotting in Python

I have data related to covid-19 cases and I would like to plot differnt time windows for each of them to show the propable time of getteing infected, time window from having symptoms to making a test, time window from test to having out the results.…
sakurami
  • 343
  • 3
  • 18
1
vote
1 answer

How to call out daily value through period index

I have a dataframe using periodindex (daily) starting from 1992-01-03. I am trying to call out the data using period index, like dataframe['1992-01-03'], but it returned an error message--Key Error:'1992-01-03'. However, it works well if I call out…
NOnaMe
  • 27
  • 5
1
vote
2 answers

period.getDays() return each time 0 in android

I try to get the correct difference time between the current day and second selected day from the calendar. I'm using in this case LocalDate and the 3 methods getDays() getMonths() getYears() to get the day and the month also the year: public int…
1
vote
1 answer

The Angular CLI process did not start listening for requests in Angular Application

I am getting the below timeout exception in Angular CLI TimeoutException: The Angular CLI process did not start listening for requests within the timeout period of 0 seconds. Check the log output for error…
1
vote
0 answers

how to get priod of a given signal using autocorrelation in python

i have written this function def autocorr(x): result = np.correlate(x, x, mode='full') return result[int(result.size/2):] corr=autocorr(PPG) plt.plot(corr) i have recived this plot.so what implies our periods, does it the peaks, the max…
Tal K
  • 53
  • 1
  • 6
1
vote
3 answers

Give group ID for date periods

I'm trying to automatize the attribution of a group number by periods of time. Because I'm writing of function to aggregate time series of weather data by different time periods defined by the user. Let's call "n" the number of sub-periods d1 =…
1
vote
2 answers

Period of weeks to string with weeks instead of days only

var period = Period.ofWeeks(2) println("period of two weeks: $period") gives period of two weeks: P14D Unfortunately for my purpose I need P2W as output, so directly the weeks instead of weeks converted to days. Is there any elegant way to do…
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
1
vote
1 answer

asfreq yields unexpected results with Period dtype

When upsampling a Dataframe, I would to like that new rows created are left empty. Considering following code: import pandas as pd p5h = pd.period_range(start='2020-02-01 00:00', end='2020-03-04 00:00', freq='5h', name='p5h') df =…
pierre_j
  • 895
  • 2
  • 11
  • 26