AttributeError: ‘DataFrame’ object has no attribute ‘dtype’
协同过滤 杰卡德相似度 计算出现报错
19行的错误代码
user_similar = 1 - pairwise_distances(df, metric=‘jaccard’)
修改后的正确代码
user_similar = 1 - pairwise_distances(df.values, metric=‘jaccard’)
在df后面加.values即可解决报错