8

I have the below data in a a.json file.

{
  "1000000000": {
    "TEST": 2
  }
}

import pandas as pd
df = pd.read_json(r"a.json", dtype= str, orient='index', convert_dates=False)
print(df)

Getting output as :

                TEST
2001-09-09 01:46:40    2

Expected :

                TEST
1000000000         2

1 Answer 1

9

You need parameter convert_axes=False in read_json:

You can use it like this

import pandas as pd
df = pd.read_json("a.json", dtype= str, orient='index',convert_axes=False ,convert_dates=False)
print(df)
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.