Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
30 views

Efficient calculation of volatility using EWMA

I am trying to calculate the volatility using EWMA (Exponentially Weighted Moving Average). Here is the function I developed: def ewm_std(x, param=0.99): n = len(x) coefs = param ** np.arange(...
NCall's user avatar
  • 121
-3 votes
0 answers
28 views

How do I build a Forecasting Model for this kind of data?

I have a dataset where the whole dataset is actually categorical data with timestamp. The other problem is that the timestamp data column has the date as well as time in it, i.e. DD/MM/YYYY HH:MM:SS ...
Varun's user avatar
  • 1
-1 votes
1 answer
33 views

Time-series correlating suspiciously high

I have two time series from 1986-01-01 to 2024-04-01 following CPI prices of meat and fish and I want to find the correlation between the both of them. They are huge dataframes so below is a truncated ...
Mya's user avatar
  • 1
0 votes
1 answer
53 views

What is the meaning of: Pandas data cast to numpy dtype of object. Check input data with np.asarray(data) and how can be solved?

I'm trying to model a time series for a stock price with the following code: import opendatasets as od import numpy as np import pandas as pd import plotly.graph_objects as go from plotly.subplots ...
José's user avatar
  • 203
1 vote
2 answers
43 views

Using pd.asfreq() on an index with duplicate values

I have a pandas timeseries with an index 'date' which has lots of duplicate dates. Now, I don't want to drop the duplicates as they refer to unique rows of data. As my data is published every week, I'...
katehasnoidea's user avatar
0 votes
1 answer
48 views

Efficiently Resampling and Interpolating Pandas DataFrames with Millisecond Accuracy

I have a Pandas DataFrame with timestamps that have millisecond accuracy and corresponding altitude values. I want to resample and interpolate this data efficiently. Here is a simple example: import ...
bfgt's user avatar
  • 307
-1 votes
2 answers
59 views

Interpolation of data with pandas

I have several measured values, each in a time series. Time steps are unevenly distributed and also uneven between the data series. I'm trying to interpolate each series into a fixed 10 second time ...
mechanicalman's user avatar
0 votes
0 answers
27 views

How do I exclude a certain column from feature extraction in tsfresh?

I'm using tsfresh to extract features comprehensively from a timeseries. I wish to exclude certain columns in my dataset from feature extraction (i.e., absolute energy, min, max, etc. shouldn't be ...
Kartik's user avatar
  • 141
2 votes
1 answer
48 views

Python : Merge two dataframes based on created time

I have two dfs, two df's has be to be merged by class and joining dates. Please check the below df's df1 class teacher age instructor_joining_date A mark 50 2024-01-20 07:18:29....
user15590480's user avatar
0 votes
2 answers
46 views

How to handle duplicates using asfreq() function. Is there any other way to do this?

I have some hourly data on electricity generation from various sources in various countries. I download data from the ENTSO-E Transparency Platform website and found a problem with data inconsistency. ...
g3nkoVMAESTRO's user avatar
1 vote
1 answer
59 views

Calculate mean values of the past x years for every month

I have historical data from 2012 to 2023. I am trying to calculate the average for every month during these years to build a 'reference year' or 'baseline'. My DataFrame (final_df) looks like this: ...
snkm's user avatar
  • 27
0 votes
0 answers
27 views

Pandas MultiIndex Rolling Group by

Pandas has some very strange group by behavior with Multi_indexing. I don't understand why one of these sites is not being calculated but when called alone works perfectly fine. Consider the following ...
ZdWhite's user avatar
  • 501
1 vote
1 answer
74 views

Rolling mean, count or quantile per group

I have a large set of tick data with milliseconds granularity, which I have loaded into a pandas DataFrame. To make handling easier, I have have added columns assigning each timestamp to a year, month,...
Oli's user avatar
  • 13
0 votes
0 answers
27 views

How to treat/fill missing data in ohlcv ccxt

I'm trying to find out a solution to treat / fill missing ohlcv data coming from cryptocurrency exchange API. I'm running this code: bars = exchange.fetch_ohlcv(symbol, interval, limit = limitklines) ...
Dommy's user avatar
  • 19
1 vote
1 answer
111 views

Time series decomposition

I have a time series that I want to decompose. Dataset (train - dataframe) example (stock price): Date Close 7389 2014-12-24 104.589996 7390 2014-12-26 105.059998 7391 2014-12-29 ...
Toly's user avatar
  • 3,147

15 30 50 per page
1
2 3 4 5
212