Questions tagged [pandas-timeindex]

questions related to pandas time series functions and methods

pandas contains extensive capabilities and features for working with time series data for all domains. Using the NumPy datetime64 and timedelta64 dtypes, pandas has consolidated a large number of features from other Python libraries like scikits.timeseries as well as created a tremendous amount of new functionality for manipulating time series data.

Read more here.

21 questions
0
votes
1 answer

Resampling and computing mean in pandas dataframe

I have a pandas data frame with 1 column and a time-based index. I want to resample the data for every two seconds and compute the average of the values in the column. Here is an example: index = pd.date_range('1/1/2000', periods=10, freq='S') data…
EngGu
  • 459
  • 3
  • 14
0
votes
1 answer

Last real-time candle from yfinance

When you are downloading data from yfinance in real-time and you are downloading multiple tickers at the same time you often get the last data example divided into several rows. Open Volume …
Borut Flis
  • 15,715
  • 30
  • 92
  • 119
0
votes
1 answer

Find current active connections given connection and disconnection times of a location

I have a dataframe that has connection date, disconnection date, rowID and RouterName. I want to find the current active connections in a while loop which iterates every minutes(this can be changed to any minutes) for 24 hours. I am trying to…
selcuky
  • 23
  • 5
0
votes
1 answer

How to resample a grouped dataframe with zero order hold?

I have a dataframe with a bunch of different measurements (each have a unique ID in a measurements column), and measurement samples taken each 10ms. Now I want to downsample all my data in order to "fake" a different sampling time, e.g. 40ms, for…
-1
votes
1 answer

Manipulate the Dataframe to start from the nearest varying Midnight timestamp

My goal: I have a dataset that gets generated every day at random hours leading to the first row to start at a random time. I want to make this dataset start from the nearest midnight date. For example, if the date on the first row is 2022-05-09…
-1
votes
1 answer

How to get column values from another dataframe with a different datetime index

I have a trading dataframes with different intervals, eg. 1 minute and 5 minute. I wish to copy the calculated value from the slower 5min to the 1min dataframe. e.g. the 1min is thus: I wish to add a forecast_5m or something to that dataframe which…
Tjorriemorrie
  • 16,818
  • 20
  • 89
  • 131
1
2