0

I have an excel file with rows containing JSON formatted data. How do I convert it into a table format?

example:

row1[{"name":"val","age":"100"}]

Output:

+---------+-----+
|   name  | val |
+---------+-----+
|   age   | 100 |
+---------+-----+

1 Answer 1

1

Hope this helps!

If you have a file with rows/records in JSON format, then you can use pandas.read_json with orient

import pandas as pd

df = pd.read_json('filename.json', orient='records')

df would be your data frame, with data in tabular format.

Reference: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_json.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.