pandas中,dataframe和series怎么用concat合并呀,现在好像append用不了了,求帮助

img


合并之后我发现是series的列添加到dataframe的做左面了,可不可以把series横过来直接加上去呢 就像append函数那样。

把pd.Series()这一行改为pd.DataFrame([dit])就好了。
pd.Series用的不太对

看下这篇博客,也许你就懂了,链接:02_Pandas.concat连接DataFrame,Series