What I expected to happen: I expected that both describe and sort_index would give me the same min and max values.
What actually happened:
output of autos[“price”].describe()
count 5.000000e+04 mean 9.840044e+03 std 4.811044e+05 min 0.000000e+00 25% 1.100000e+03 50% 2.950000e+03 75% 7.200000e+03 max 1.000000e+08 Name: price, dtype: float64
output of autos[‘price’].value_counts().sort_index(ascending=False)
99999999 1 27322222 1 12345678 3 11111111 2 10000000 1
Is there something I am doing wrong?
According to me the index of the series returned by value_counts is same as that of the values returned by the describe method.
Thanks in advance!