相关疑难解决方法(0)

df.join() 问题:ValueError:您正在尝试合并对象和 int64 列

这些问题都没有解决问题:问题 1问题 2,我也无法在 pandas 文档中找到答案。

您好,我正在尝试查找此错误的根本原因:

ValueError: You are trying to merge on object and int64 columns.
Run Code Online (Sandbox Code Playgroud)

我知道我可以使用 Pandasconcatmerge函数来解决这个问题,但我试图了解错误的原因。问题是:为什么我会得到这个ValueError

这是使用的两个数据帧上的head(5)和的输出info()

print(the_big_df.head(5)) 输出:

  account  apt  apt_p  balance       date  day    flag  month  reps     reqid  year
0  AA0420    0    0.0  -578.30 2019-03-01    1       1      3    10  82f2d761  2019
1  AA0420    0    0.1  -578.30 2019-03-02    2       1      3    10  82f2d761  2019
2  AA0420    0    0.1  -578.30 2019-03-03    3       1      3 …
Run Code Online (Sandbox Code Playgroud)

python join dataframe pandas

10
推荐指数
2
解决办法
1万
查看次数

标签 统计

dataframe ×1

join ×1

pandas ×1

python ×1