TypeError:合并DataFrame的'int'和'str'实例之间不支持'<'

时间:2019-12-11 17:09:38

标签: python pandas dataframe

我有一个简单的代码来合并两个DataFrame。 df1有23590行和4列,而df2有7725行和4列。关键是将它们带到相同的尺寸以进行进一步处理。但是,虽然该代码曾经用于其他DataFrame,但现在可以在TypeError: '<' not supported between instances of 'int' and 'str'中解析。

我使用的代码是:

df3 = pd.merge(df1, df2, left_index=True, right_index=True)

我从不使用'<',并且DataFrames的所有列的数据类型均为'float64'。

在寻找答案时,我看到了许多具有相同错误消息的类似问题,但所有涉及的问题都使用符号“ <”或不同的数据类型。

0 个答案:

没有答案