试图连接数据帧,但得到一个AttributeError?

时间:2014-08-05 14:13:30

标签: python pandas

我试图连接两个看起来像这样的数据框:

Dataframe 1

            Beta   Diff
0   Week1    .5                 
1   Week2    .7     .2
2   Week3    .9     .2

Dataframe 2

            Beta   Diff
0   Week4    .11                 
1   Week5    .13     .2
2   Week6    .15     .2

但是,当我尝试运行时

combined = pd.concat([df1, df2])

我收到以下错误消息:

AttributeError: 'BlockManager' object has no attribute 'dtype'

有谁知道如何解决这个问题?谢谢!

1 个答案:

答案 0 :(得分:0)

显然这是一个版本问题。更新为Pandas 0.13.1,它工作正常。