完美解决TypeError: concat() got an unexpected keyword argument ‘join_axes‘
文章目录
- 报错问题
- 解决方法
- 声明
报错问题
之前在工作中遇到过这个坑,记录一下问题以及解决方法,不一定针对所有情况都能用,但是可以供大家参考。
问题描述如下:
TypeError: concat() got an unexpected keyword argument ‘join_axes‘
类型错误:concat()得到一个意外的关键字参数’join_axes’
解决方法
得到原因:“join_axes” was deprecated in version 0.25 for some reason. You can achieve the same effect by reindexing.
可知"join_axes"在0.25版中已弃用,故可采用merge函数代替concat函数,join_axes参数可采用on参数替代!
df_concat05 = pd.merge(data_frameA, data_frameC, on='name', how='inner')
print('merge_inner………… \n',df_concat05)
声明
解决方法参考网络,如有侵权联系我删除