Input DataFrame: Input Dataframe
We have to swap the value in input data frame according to the value mentioned in Reference Table. Ref Table means (A>>1, B>>2, C>>3......)
Desired Output: Desired Output
dp1 = dp1.set_index('Ref')
for i in range(df1.shape[1]):
df1.iloc[:,i] = df1.iloc[:,i].replace(dp1.iloc[:])
Join & Merge function does not work in this question.
It is not swapping the input table value. Please suggest where am I getting wrong or alternative method to do?