Я пытаюсь прочитать файл json и преобразовать его в формат данных. Но я не могу полностью сделать это, используя два разных метода.
for m_file in os.listdir('.'):
if m_file.startswith('180830') and m_file.endswith('_out.json'):
input_file2 = open(m_file, 'r')
output_json = input_file2.read()
#output_df = pd.read_json(output_json, orient=str) #gives me ValueError: Expected object or value error
output_df = pd.DataFrame(eval(output_json)) #gives me the contructor error
print(output_df)