title: Compare columns in Dataframe with inconsistent type values
body: <pre><code>import pandas as pd
  
  df = pd.DataFrame({'RMDS': ['10.686000','NYSE_XNAS','0.472590','qrtr'], 'Mstar': ['10.690000', 'NYSE_XNAS', '0.473590','mnthly']})
  </code></pre>
  
  <p>Dataframe df will look like this:</p>
  
  <pre><code>    Mstar       RMDS
  0   10.690000   10.686000
  1   NYSE_XNAS   NYSE_XNAS
  2   0.473590    0.472590
  3   mnthly      qrtr
  </code></pre>
  
  <p>I want to compare value of 'RMDS' with 'Mstar' and type of dataframe is 'object',this is huge dataframe and I need to compare rounded values </p>
  
  <p>mask = np.around(pd.to_numeric(df.Mstar), 2) != np.around(pd.to_numeric(df.RMDS), 2)</p>
  
  <p>df_Difference = df[mask]</p>
  
  <p>since values in columns are not consistent so whenever string values are coming like 'qrtr' , above logic is failing as I am using pd.to_numeric but still i wanted to compare 'qrtr' from 'RMDS' to 'mnthly' in 'Mstar' </p>
  
  <p>Is there any way I could handle this type of situation.</p>