1
from pandas.io.json import json_normalize

record = {'a': {'b': 1, 'c': 2}}
df = json_normalize(record)
print(df.query("a.b == 1"))

Printing below error: File "C:\Python37\lib\site-packages\pandas\core\computation\scope.py", line 194, in resolve
raise compu.ops.UndefinedVariableError(key, is_local)
pandas.core.computation.ops.UndefinedVariableError: name 'a' is not defined

kishore
  • 41
  • 3

0 Answers0