I have a df like this,
Cola Colb
Mr Mr..!
Mrs Mrs.!.
Mr Tests
I want to compare these two columns ignoring the (. and ! present in Colb) - I can generate a new column while replacing the unwanted characters. But, is there a better way to do it using pandas function ?
The expected results are true for all of the 3 rows.
This is my single line of code for a direct compare,
temp_result_df[res_col_name] = \
((temp_result_df[primaryreportreqcolname] == temp_result_df[RequiredSecondaryReport_Col_Name])\
& (temp_result_df[RequiredSecondaryReport_Col_Name]!= 'Tests'))
New to Python. So, I am exploring the different functions and methods to do a compare with some noise in the data.