英文:
pandas.concat() second argument?
问题
I freshly installed a program through pip3 and it now fails like this:
pandas.concat(dataFrameList, 0)
TypeError: concat() takes 1 positional argument, but 2 were given
I looked at the concat()
function prototype in Pandas 0.9, 1.x and 2.x documentation but it appears that this second argument was never allowed; it works with Pandas 1.5 though...
What is the 0
supposed to do? Is it safe to remove it from the code?
英文:
I freshly installed a program through pip3 and it now fails like this:
pandas.concat(dataFrameList, 0)
TypeError: concat() takes 1 positional argument, but 2 were given
I looked at the concat()
function prototype in Pandas 0.9, 1.x and 2.x documentation but it appears that this second argument was never allowed; it works with Pandas 1.5 though...
What is the 0
supposed to do? Is it safe to remove it from the code?
答案1
得分: 2
"我认为这是对axis
参数的缩写:
pandas.concat(dataFrameList, axis=0)
这是默认参数,因此可以移除:
pandas.concat(dataFrameList)"
英文:
I think it is shorcut to axis
parameter:
pandas.concat(dataFrameList, axis=0)
what is default parameter, so should be removed:
pandas.concat(dataFrameList)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论