import pandas as pd
import json
with open('file_name', 'r') as f:
data = json.loads(f.read())
df = pd.DataFrame(data)
# 或者
df = pd.DataFrame(data['list_data'])
重新排列列名
cols = ['model','pic','result']
df = df.loc[:,cols]
2024-04-10 22:27:12
import pandas as pd
import json
with open('file_name', 'r') as f:
data = json.loads(f.read())
df = pd.DataFrame(data)
# 或者
df = pd.DataFrame(data['list_data'])
cols = ['model','pic','result']
df = df.loc[:,cols]