The error message "AttributeError: 'numpy.ndarray' object has no attribute 'iloc'" occurs when you try to access the iloc attribute of a NumPy array. The iloc attribute is specific to pandas dataframes and series, and is used to access rows and columns by index.

To fix this error, you can convert the NumPy array to a pandas dataframe or series, and then use the iloc attribute to access the specific rows and columns that you need. Alternatively, you can use NumPy array indexing to access the specific elements of the array that you need, without using the iloc attribute

AttributeError numpyndarray object has no attribute iloc

原文地址: https://www.cveoy.top/t/topic/cpYH 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录