【问题解决】AttributeError: 'Series' object has no attribute 'as_matrix' 出错情况如下: 出错原因:as_matrix不能用 解决方式:将.as_matrix()改为.values 测试运行: 问题解决。