I believe you need json.load for convert json to dicts or list of dicts first:
import json
from pandas.io.json import json_normalize
with open('data.json') as data_file:
data = json.load(data_file)
And then if necessary json_normalize:
df = json_normalize(data)
print (df)
Domain Points Search Name UserId UserName UserRole
0 Hello 0 wonderful1 hello wonder1 Wonderful1 Hello CONSUMER
Or if there is only one dictionary in data like in sample:
df = pd.DataFrame([data])
print (df)
Domain Points Search Name UserId UserName UserRole
0 Hello 0 wonderful1 hello wonder1 Wonderful1 Hello CONSUMER
Or if there are list of dictionaries:
df = pd.DataFrame(data)
EDIT:
Because not valid json file one possible solution is use yaml.load:
import yaml
from pandas.io.json import json_normalize
with open('data.json') as data_file:
data = yaml.load(data_file, Loader=yaml.FullLoader)
print (data)
{'Domain': 'Hello', 'Points': 0, 'Search Name': 'wonderful1 hello',
'UserId': 'wonder1', 'UserName': 'Wonderful1 Hello',
'UserRole': 'CONSUMER', 'CONS': None}
df = json_normalize(data)
print (df)
Domain Points Search Name UserId UserName UserRole CONS
0 Hello 0 wonderful1 hello wonder1 Wonderful1 Hello CONSUMER None