We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version: redis-5.0.7 Platform: Python 3.9 on Windows 10 Already update to latest docker image redis/redis-stack-server:latet Description:
redis/redis-stack-server:latet
first = rts.ts.range('000001.SZ:raw:price', '-', '+', count=10) last = rts.ts.range('000001.SZ:raw:price', '-', '+', count=1, latest=True) print(ts_to_datetime(first[0][0]), ts_to_datetime(last[0][0]))
output same
2024-07-08 15:00:00 2024-07-08 15:00:00
get is correct
get
last2 = rts.ts.get('000001.SZ:raw:price', latest=True) print(ts_to_datetime(last2[0]))
2024-07-09 15:00:00
mget is correct
mget
last3 = rts.ts.mget(filters=['tframe=raw', 'code=000001.SZ', ], latest=True) print(ts_to_datetime(last3[1]['000001.SZ:raw:price'][1]))
import pandas as pd lst = rts.ts.range('000001.SZ:raw:price', '-', '+') df =pd.DataFrame(lst, columns=['ts', 'price']) df.ts.apply(ts_to_datetime)
output, can see 2024-07-09 15:00:00 is the latest
0 2024-07-08 15:00:00 1 2024-07-09 09:22:33 2 2024-07-09 09:22:42 3 2024-07-09 09:22:51 4 2024-07-09 09:23:00 ... 4682 2024-07-09 14:59:24 4683 2024-07-09 14:59:33 4684 2024-07-09 14:59:42 4685 2024-07-09 14:59:51 4686 2024-07-09 15:00:00 Name: ts, Length: 4687, dtype: datetime64[ns]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version: redis-5.0.7
Platform: Python 3.9 on Windows 10
Already update to latest docker image
redis/redis-stack-server:latet
Description:
first = last
output same
get
is correct2024-07-09 15:00:00
mget
is correct2024-07-09 15:00:00
get all
output, can see
2024-07-09 15:00:00
is the latestThe text was updated successfully, but these errors were encountered: