title: Why is data is getting deleted when merging two CSV files using Pandas?
body: <p>Hoping to get some insight on this issue, I am using Pandas to try and clean data then merge two records together. The code is below, it is successfully merging the two file headers but then deletes all my rows. </p>
  
  <p>Before I can merge them, I have to rename the column of one file to match the other, then I need to strip out the string from the cell contents and finally convert the column from an object to an INT.  </p>
  
  <p>This is my first program, so it is a lot to bite off and I know I can do this in EXCEL in 2 minutes but want to automate it in the long term.</p>
  
  <p>Thanks in advance.</p>
  
  <pre><code>import pandas as pd
  import os
  os.chdir("c:/users/user/desktop/exercises")
  
  fileA = pd.read_csv("./fileA.csv")
  fileB = pd.read_csv("./fileB.csv")
  
  fileA.loc[:,'step'].replace(regex=True,inplace=True, to_replace="Case ID Number - 00", value="") 
  fileA = fileA.rename(columns={'step':'Case Number'}) 
  fileA['Case Number'] = pd.to_numeric(contextor['Case Number'], errors='raise')
  print(fileA.info())
  
  #Merge works but then deletes all the table data
  MERGE = fileA.merge(fileB,on='Case Number')
  MERGE.to_csv('UPDATEDMERGE.csv')
  </code></pre>