Answers for "python pandas from json"

9

read json pandas

df = pd.read_json('data.json')
Posted by: Guest on May-15-2020
5

pandas to json

>>> df.to_json(orient='records')
'[{"col 1":"a","col 2":"b"},{"col 1":"c","col 2":"d"}]'
Posted by: Guest on February-27-2020

Python Answers by Framework

Browse Popular Code Answers by Language