我有以下数据帧
+--------------------+
| _1|
+--------------------+
|{"entry": {"@type...|
|{"entry": {"@type...|
|{"entry": {"@type...|
|{"entry": {"@type...|
|{"entry": {"@type...|
|{"entry": {"@type...|
|{"entry": {"@type...|
|{"entry": {"@type...|
|{"entry": {"@type...|
|{"entry": {"@type...|
|{"entry": {"@type...|
|{"entry": {"@type...|
|{"entry": {"@type...|
|{"entry": {"@type...|
|{"entry": {"@type...|
+--------------------+
only showing top 20 rows
每行包含有效的JSON。我希望保存这个文件,这样我就有了一个文件,最好是JSON,它只是一个对象的嵌套(上面的这些行)。不过,我得到了一个JSON对象
{"_1":"{"entry": {"@type...}
我只想
{"entry": {"@type...}
{"entry": {"@type...}
{"entry": {"@type...}
最简单的方法之一是将转换为rdd并仅选择值作为
然后您可以将rdd转换为dataframe并将它们保存为
或者您可以将它们直接保存到文本json文件中
我希望答案是有帮助的
相关问题 更多 >
编程相关推荐