如何解决“ valueError:无法将DataFrame与类型为<class'str'=“”>“的实例合并?

时间:2018-09-12 20:18:16

标签: python valueerror

遇到此错误

  

valueError:无法将DataFrame与类型为

的实例合并

使用以下代码:

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

contract = pd.read_csv('4.CONTRACT_0806.csv')
contractaff = pd.read_csv('5.CONTRACTAFFILIATE_0806.csv')
df1 = pd.DataFrame(contract)
df2 = pd.DataFrame(contractaff)

mergedf = pd.merge('df1','df2',how = 'outer',left_on=['CONTRACT_CONTRACT_ID'])

那是为什么?

0 个答案:

没有答案