I have to upload on redis a pandas's dataframe with a column as unique key(timestamp). To do this, I've created a dict in python like this:
dict0 = {1431036000: {'col1': '08-05-2015', 'col2': 1.934, 'col3': 905.0} ,
1431122400: {'col1': '09-05-2015', 'col2': 2.004, 'col3': 700.0}, ..........}
and I started a redis client with this
db0 = redis.Redis(host = xxxx, port = 6379, db=0)
- What function should I use to upload dict0 to db0, so I can get all values(with labels) by making a get(timestamp)?
- Having another dict (dict1) that I want to upload to another database, is it correct to do this to have the two databases separated ? Cause dict0 and dict1 may have same keys.
db1 = redis.Redis(host = xxxx, port = 6379, db=1)
If you have suggestions for doing it (dataframe->redis) better let me know, thank you in advance.