wesm / pydata-book

Materials and IPython notebooks for "Python for Data Analysis" by Wes McKinney, published by O'Reilly Media
Other
22.27k stars 15.2k forks source link

Ch 05: Series.order has been deprecated #60

Closed JingQin-JQ closed 7 years ago

JingQin-JQ commented 7 years ago

Dear pydata-book maintainer,

In Sorting and ranking section of Chapter 5, Series.order function is used:

obj = Series([4, 7, -3, 2])
obj.order()
obj = Series([4, np.nan, 7, np.nan, -3, 2])
obj.order()

Since order function has been deprecated, maybe we should modify it to sort_value like below?

obj = Series([4, 7, -3, 2])
obj.sort_value() # Series.order has been deprecated from v0.17
obj = Series([4, np.nan, 7, np.nan, -3, 2])
obj.sort_value() # Series.order has been deprecated from v0.17

Best regards, Jing Qin

wesm commented 7 years ago

Fixed in 2nd edition