pandas常用的文件读取方法 def read_data(fp): try: td = pd.read_excel(fp) # 直接读取excel,目前很少见到excel文件解析异常 except Exception as err1: try: td = pd.read_csv