Hey I'm using python3 and I want to merge two csv files by columns, I did it right but I want the merge will look on only two digits after the numbers and merge by that.
For example if I have this two csv
df1:
X1 Y1 Z1
1.232 2.271 6
3.527 5.628 7
df2:
X2 Y2 Z2
1.231 2.275 6
3.526 5.624 7
The current solution won't merge by the columns X and Y because the third digit after the numbers are diffrent, and I want the merge commend to look only two digits after the numbers and merge by them.
Here is my current solution:
from pandas import merge
df1 = merge(df1, df2, left_on=['X1', 'Y1'], right_on=['X2', 'Y2'])
So from thia solution the two data frames won't merge, and I want them to be merge and ignore the third digit after the number.