Pickle alternatives

后端 未结 8 2139
南旧
南旧 2021-02-05 04:16

I am trying to serialize a large (~10**6 rows, each with ~20 values) list, to be used later by myself (so pickle\'s lack of safety isn\'t a concern).

Each row of the lis

8条回答
  •  伪装坚强ぢ
    2021-02-05 04:43

    • Protocol Buffer - e.g. used in Caffe; maintains type information, but you have to put quite much effort in it compared to pickle
    • MessagePack: See python package - supports streaming (source)
    • BSON: see python package docs

提交回复
热议问题