The frame.append method is deprecated and will be removed from pandas in a future version.

这个报错是为什么呀
写了个循环把它放进去就出错了
FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.

def save(self, list):
if os.path.exists(self.path):
df = pd.read_excel(self.path)
df = df.append(list)
else:
df = pd.DataFrame(list)

改成
def save(self, list):
if os.path.exists(self.path):
df = pd.read_excel(self.path)
df = df.concat(list)
else:
df = pd.DataFrame(list)
又会提示我没有concat这个属性
AttributeError: 'DataFrame' object has no attribute 'concat'

第一个是弃用警告,append方法将弃用,建议使用concat方法,而concat是pandas的函数,pandas.concat()通常用来连接DataFrame对象。要写成df=pd.concat([df1,df2])类似这样
参考
https://zhuanlan.zhihu.com/p/69224745

你是要 df = pd.concat(df,pd.DataFrame(list)) ?

您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!
PS:问答VIP年卡 【限时加赠:IT技术图书免费领】,了解详情>>> https://vip.csdn.net/askvip?utm_source=1146287632