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.19k forks source link

ch08 - error in example #140

Closed anicelysantos closed 3 years ago

anicelysantos commented 3 years ago

Hi, i am having the following error when running this example.

pd.concat([s1,s4], axis=1, join_axes=[['a','c','b','e']])

TypeError: concat() got an unexpected keyword argument 'join_axes'

Can someone help me please? I saw that this option was discontinued, but I don't know how to adapt the example.

wesm commented 3 years ago

I believe it's

pd.concat([s1,s4], axis=1).reindex(columns=['a','c','b','e'])

I'm working (slowly) on the 3rd edition and will fix this along with fixing up any other broken / deprecated code examples