I reproduce the code of book python for data analysis in page 38
I write
prop_cumsum = df.sort_index(by='prop', ascending=False).prop.cumsum()
and prop_cumsum.searchsorted(0.5)
Then there is an error say:
AttributeError Traceback (most recent call last)
<ipython-input-30-f2e2bb3f5ba0> in <module>()
----> 1 prop_cumsum.searchsorted(0.5)
C:\Users\xxx\AppData\Local\Enthought\Canopy32\User\lib\site-packages\pandas\core\generic.pyc in __getattr__(self, name)
1813 return self[name]
1814 raise AttributeError("'%s' object has no attribute '%s'" %
-> 1815 (type(self).__name__, name))
1816
1817 def __setattr__(self, name, value):
AttributeError: 'Series' object has no attribute 'searchsorted'
I can't understand why i re-install numpy and lib pandas it still can't work It's no searchsorted methode in series in the document of pandas
In [49]: