我有一列浮点整数索引
file['Id'].dtypes => dtype('float64')
在计算最高值时,它不会抛出错误,但是如果我尝试检索前十个索引,则会抛出值错误:
counts = pd.DataFrame(file['Id'].value_counts().copy(deep = True)) -> no error
counts = pd.DataFrame(file['Id'].value_counts()[:10].copy(deep = True)) -> error
ValueError: index must be monotonic increasing or decreasing
During handling of the above exception, another exception occurred: