小编Zor*_*rro的帖子

AttributeError: 'DataFrame' object has no attribute 'append' for DataFrame

I am trying to create a DataFrame object for my spam classifier.It's supposed to contain two columns: 'messages' and 'class'. However when I use the dataframe.append function to add emails as 'messages' to my dataframe along with the folder name as 'class', I'm getting this error:

AttributeError: 'DataFrame' object has no attribute 'append'

For this I initially created a Dataframe as follow data = DataFrame({'message': [], 'class': []})

I tried to use the DataFrame.append() function for adding the spam and …

python append dataframe pandas

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

append ×1

dataframe ×1

pandas ×1

python ×1