Is there any function in python similar to dput() function in R?
python中的任何函数是否与R中的dput()函数类似?
3 个解决方案
#1
6
There are several options for serializing Python objects to files:
将Python对象序列化为文件有几种选择:
json.dump() stores the data in JSON format. It is very read- and editable, but can only store lists, dicts, strings, numbers, booleans, so no compound objects. You need to import json before to make the json module available.