错误提示:
AttributeError: ‘DataFrame’ object has no attribute ‘append’
出现错误的代码:
df_train_log = pd.DataFrame()
df_train_log = df_train_log.append(log_train, ignore_index=True)
原因:
append包在pandas被弃用
解决方法:
将代码改为:
df_train_log = pd.concat([df_train_log, pd.DataFrame([log_train])], ignore_index=True)