Open FlynnMa opened 2 years ago
@FlynnMa This sounds interesting. Can you elaborate more? I could imagine using the library for pumping data into time series db with near real time and cold processing capabilities around it. But for me it is more like how you use the lib and not about implementation of the lib. What's your idea?
Hi,
Here is a quick pandas based time series for example, it looks like:
Here is piece of code fetching data use yfinance for your reference
import yfinance as yf
sym = 'AAPL'
apple = yf.Ticker(sym)
apple_dataframe = apple.history(period='1d', interval='1m')
apple_dataframe
once you got a time series based dataframe, it can be easily resampled like:
ohlcv_dict = {
'Open': 'first',
'High': 'max',
'Low': 'min',
'Close': 'last',
'Volume': 'sum'}
apple_dataframe = apple_dataframe .resample('10min').agg(ohlcv_dict)
Ok, got you. Would like this functionality to be added to this lib or better another separate lib?
I would suggest add into this lib, For most data analysis, the time series based data would enable everyone's life easier, or else I am afraid all of them will need to do the data cooking before they can go.
I think most of people will need it As this lib continously report event based message, to convert into time series will make it more useful.
Or has anyone done that?