- 读取json 文件
- 读取前端上传的excel文件
注意json 最好放在项目根目录
with open('acs_door_v2_list.json', 'r', encoding='utf-8') as r:
asc_door_list = json.loads(r.read())
df = pd.Dataframe(asc_door_list)
读取前端上传的excel文件
invitation_df = pd.read_excel(request.FILES['file'], dtype={"(*)邀约负责人学号/工号": str},
sheet_name='邀约单位基本信息表')


![[python]操作文件 [python]操作文件](http://www.mshxw.com/aiimages/31/350353.png)
