错误:AttributeError: 'numpy.ndarray' object has no attribute 'iloc'解决:去除iloc即可比如将:data.iloc[:100,:]更改为:data.[:100,:]就ok了 keras-gpu = 2.3.1 今天在以TensorFlow2.1.0为后端的Keras中使用TensorBoard时 报错 ,发现原因是keras和tf.keras混用导致的。 报错 解决 方案如下: 导致 报错 语句: summary = TensorBoard(log_dir="cnn_lstm_logs/",histogram_freq=1) ---> 54 summary = TensorBoard(log_dir="cnn_lstm_log
解决 AttributeError : module ‘ numpy ‘ has no attribute ‘int‘。​ 原因: numpy .int在 NumPy 1.20中已弃用,在 NumPy 1.24中已删除。 解决 方式:将 numpy .int更改为 numpy .int_,int。
在使用 Numpy 时候, AttributeError : ‘ numpy . nd array object has no attribute ‘value_counts’,表示 numpy . nd array 没有value_counts属性的 解决 办法 Traceback (most recent call last): File "C:/Users/kingS/PycharmProjects/ python 学习/机器学习/比赛_西财/test11.py", line 58, in <module>
有时候做完一个案例的分析,模型做好了,最后想把预测的结果保存为CSV文件。这个预测的结果一般是n行1列的一个数列,我们最后就是想把预测结果保存下来。  submission = clf.predict(credit_test)#submission是我的预测结果,是一个5000*1的列向量 submission = pd.DataFrame({'RISK':submission}) #必须把这个s...
报错 AttributeError : ‘ numpy . nd array object has no attribute ‘columns’ 解决 : 直接使用 a.tolist() 处理数据即可 解决 问题。 参考文章: python 中list与 array 类型的查看与转换 import numpy as np np.set_printoptions(threshold = 1e6) test = np.load('E:/jiaxin/一些烂七八糟/034_pbb.npy')
在使用 python 写美颜算法时,出现一个 bug AttributeError : ' numpy . nd array ' object has no attribute 'brighten',brighten方法是我自己写的,然后调用。 im = cv.imread(src_file, cv.IMREAD_COLOR) thin_face=thin_face.thin_face(im,face_point,70) big_eye=big_eye.enlarge_eyes(thin_fac.