Alex Luya Alex Luya - 1 year ago 626
Python Question

How to set/get pandas.DataFrame to/from redis?

After setting DatFrame to redis,then get from it,redis returns a string,and I can't figure out a way to convert this str to DataFrame,so how to do these two appropriately?Thanks.

Answer Source


redisConn.set("key", df.to_msgpack(compress='zlib'))


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download