data structures - Is it possible to load a particular range of a serialized python dictonary from hard disk? -
i have huge dictionary serialized in hard disk. don't have enough memory load in memory. need read particular range of dictionary (say 100th - 200th element in dictionary).
is possible load these elements file? note keys , values of dictionary strings.
how did serialize data? (pickle/json/...)
also note elements in dictionary not sorted (except if used collections.ordereddict
). retrieving range of elements may not give expect.
if amount of data trying handle exceeds memory wouldn't better use kind of database? if data dict, shelve
or redis
might appropriate.
Comments
Post a Comment