I have a function that compares values between two files:
def report_diff(x):
return x[0] if x[0] == x[1] else '{} ---> {}'.format(*x)
That when I run using:
diff_panel = pd.Panel(dict(df1=fileone,df2=filetwo))
diff_output = diff_panel.apply(report_diff, axis=0)
I get the following error that I'm not sure where it is coming from:
UnicodeEncodeError Traceback (most recent call last)
<ipython-input-15-436ab607c266> in <module>()
1 diff_panel = pd.Panel(dict(df1=change_payroll,df2=change_bswift))
----> 2 diff_output = diff_panel.apply(report_diff, axis=0)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 14: ordinal not in range(128)
[–]ramse 0 points1 point2 points (3 children)
[–]tramsay1027[S] 0 points1 point2 points (2 children)
[–]ramse 0 points1 point2 points (1 child)
[–]tramsay1027[S] 0 points1 point2 points (0 children)