내가 배열파이썬 NumPy와는 : 모양 변경이
myArray = np.reshape(myVector,[nCol,nRow])
에 벡터를 바꿀려고되지 않습니다하지만 난 감가 상각 경고 얻을 : 나는
myArray = np.values.reshape(myVector,[nCol,nRow])
를 사용하는 경우
FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.reshape(...) instead
return reshape(newshape, order=order)
을
오류가 발생했습니다
AttributeError: module 'numpy' has no attribute 'values'
누군가가 무슨 일이 일어나고 있는지, 내가 무엇을해야하는지 설명해주십시오. 많은 감사
없는 그 . 'myVector'는 팬더 객체입니까? –
@WarrenWeckesser 예, myVector는 더 큰 데이터 프레임의 한 열입니다. 죄송합니다 간과 했음 – jlt199
numpy 배열 객체에 액세스하기 전에 nump 배열 객체에 액세스해야합니다. 'np.reshape (myVector.values, (nCol, nRow))' – Psidom