Screen Link:
My Code:
taxi_modified[550:552,7] = taxi_modified.mean(taxi_modified[:,5])
What I expected to happen:
To have the mean of column 6 stored in cells [550,7] and [551,7]
What actually happened:
TypeError: only integer scalar arrays can be converted to a scalar index
correct code is taxi_modified[550:552,7] = taxi_modified[:,7].mean(), Can somebody tells me why?
Why there is error in my code? what is the difference?