2

JSON File:-

 {"customer_name":"james",
   "customer_id":41
 }

my Python code below gives the error message :-

  " ValueError: If using all scalar values, you must pass an index "

Please let me know what is the issue in the below code.

import pandas
pandas.read_json("p1.json").to_excel("out-put.xlsx")
1
  • This issue might be cause of incapable type Commented Jan 5, 2019 at 21:16

1 Answer 1

2

You can try:

pandas.read_json("p1.json", typ = 'series')

It creates pd.Series

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

2 Comments

TypeError: read_json() got an unexpected keyword argument 'type'
Sorry, it is typ

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.