Это мой код для рекомендованной системы c.
Это ошибка.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-19-b58e57e00aac> in <module>
2 print (query_index)
3
----> 4 distances, indices = model_knn.kneighbors(wide_artist_data.iloc[query_index, :].reshape(1, -1), n_neighbors = 6)
5
6 for i in range(0, len(distances.flatten())):
~\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\generic.py in __getattr__(self, name)
5272 if self._info_axis._can_hold_identifiers_and_holds_name(name):
5273 return self[name]
-> 5274 return object.__getattribute__(self, name)
5275
5276 def __setattr__(self, name: str, value) -> None:
AttributeError: 'Series' object has no attribute 'reshape'