time-series

How to get values at start and end of each day in a time series

How to get values at start and end of each day in a time series Question: I have a time series with 2 columns and ~10k rows: Time Value 2022-01-01 09:53:34 1.9342 2022-01-01 19:03:21 2.3213 2022-01-02 10:14:32 3.4332 2022-01-02 11:31:51 0.387 … I want to summarize the data by day and get the start, end, …

Total answers: 3

Unsupported operand type on Time series management

Unsupported operand type on Time series management Question: Today, I will to manage my time series dataset for using the library TSfresh and make time series classification. I use this tutorial, to adapt the code to my data. For now, I realize some steps, but one error occurs in the splitting data : import os …

Total answers: 2

ImportError: cannot import name 'NDArray' from 'numpy.typing' (Prophet)

ImportError: cannot import name 'NDArray' from 'numpy.typing' (Prophet) Question: I have not had as much trouble trying to install any other package in my Python experience than I have with Prophet. Here is a snippet of my code: #Import libraries import pandas as pd from prophet import Prophet #Load data test = pd.read_csv(‘https://raw.githubusercontent.com/facebook/prophet/main/examples/example_wp_log_peyton_manning.csv’) test.head() # …

Total answers: 1

Get entire days timestamp with secs in python

Get entire days timestamp with secs in python Question: I need to trying to get entire days timestamp in array. I need from 00:00:00 to 24:00:00 seconds of timestamp a day i.e 86400 data. I have used pandas to achieve but could not m_days=1 # today’s date in timestamp base = pd.Timestamp.today() timestamp_list = [base …

Total answers: 1

Aggregate time series data on weekly basis

Aggregate time series data on weekly basis Question: I have a dataframe that consists of 3 years of data and two columns remaining useful life and predicted remaining useful life. I am aggregating rul and pred_rul of 3 years data for each machineID for the maximum date they have. The original dataframe looks like this- …

Total answers: 1

Calculate difference of rows in Pandas

Calculate difference of rows in Pandas Question: I have a timeseries dataframe where there are alerts for some particular rows. The dataframe looks like- machineID time vibration alerts 1 2023-02-15 220 1 11:45 1 2023-02-15 221 0 12:00 1 2023-02-15 219 0 12:15 1 2023-02-15 220 1 12:30 1 2023-02-16 220 1 11:45 1 2023-02-16 …

Total answers: 1

python pandas resample monthly aggregated data to daily, then aggregate back to weekly

python pandas resample monthly aggregated data to daily, then aggregate back to weekly Question: Here is my example data: team sales month a 100 1/1/2023 a 200 2/1/2023 b 600 1/1/2023 b 300 2/1/2023 load in pandas like so: mydata = pd.DataFrame([ [‘team’,’sales’,’month’], [‘a’, 100, ‘1/1/2023’], [‘a’, 200, ‘2/1/2023’], [‘b’, 600, ‘1/1/2023’], [‘b’, 300, ‘2/1/2023’] …

Total answers: 1

Converting dataframe column from hhmmss to hh:mm:ss in python

Converting dataframe column from hhmmss to hh:mm:ss in python Question: As my time-series dataframe is in the time format hhmmss, I can’t plot it against my data without it skipping, for instance, 000059 -> 000100 at the end of every minute. Data Head When I search for solutions, they all show conversion of hh:mm:ss to …

Total answers: 2

InfluxDB: How to deal with missing data?

InfluxDB: How to deal with missing data? Question: Question Description We are performing a lot of timeseries queries, these queries sometimes result in issues, they are usually performed through an API (Python) and sometimes result in complete failure due to data missing. Due to this situation we are not sure where to educate ourselves and …

Total answers: 1

DataFrame: Rolling Year-to-Date cumulative STD (Time Series)

DataFrame: Rolling Year-to-Date cumulative STD (Time Series) Question: I have a DataFrame that looks something like this: daily_return year month day date 2018-12-27 NaN 2018 12 27 2018-12-28 1.020245 2018 12 28 2018-12-31 1.000650 2018 12 31 2019-01-02 1.020473 2019 01 02 2019-01-03 1.009129 2019 01 03 … … … … .. 2023-01-20 1.001087 2023 …

Total answers: 1