title: How to compare two columns using pandas?
body: <p>BACKGROUND:
  I have two columns: 'address' and 'raw_data'. The dataset looks like this:
  <a href="https://i.stack.imgur.com/GquSr.png" rel="nofollow noreferrer">this is just a sample I made up, the original dataset is over 6m rows and in a different language</a></p>
  <p>Problem:
  I need to find all the data where the 'address' and 'raw_data' are not matched meaning there were some sorta of mistakes were made when logging in the data from 'address' to 'raw_data.</p>
  <p>I'm fairly new to Pandas. My plan is separate the 'raw_data' column by comma, then compare the newly produced columns with the original 'address' column (to see if the 'address' column has those info, if not, that means there is a mistake?).</p>
  <p>Like I said, I'm new to pandas and this is what I have so far.</p>
  <pre><code>import pandas as pd
  columns = ['address', 'raw_data']
  df=pd.read_csv('address.csv', usecols=columns)
  df = pd.concat([df['address'], df['raw_data'].str.split(',', expand=True)], axis=1)
  </code></pre>
  <p>Now the new columns has info like this: &quot;CITY&quot;:&quot;ATLANTA&quot;. I want to the columns to just have ATLANTA without all the the colons and 'CITY' in order to compare the info with 'address' column.
  How should I go on about it?</p>
  <p>Also, at this point of my pandas learning experience, I do not yet know how to compare two columns. Could someone help a newbie out please? Thanks a lot!</p>
  <p>PS: by comparison of two columns I meant to check whether one column has the characters in the second column, not to check whether the two columns are equal. Just want to point that out.</p>