title: Is there any method to replace specific data from column without breaking its structure or spliting
body: <p>Hi there i am trying to figure out how to replace a <strong>specific data of csv</strong> file. i have a file which is base or <em>location data</em> of <em>id's.</em>
  <a href="https://store8.gofile.io/download/5b031959-e0b0-4dbf-aec6-264e0b87fd09/service%20block.xlsx" rel="nofollow noreferrer">https://store8.gofile.io/download/5b031959-e0b0-4dbf-aec6-264e0b87fd09/service%20block.xlsx</a> (sheet 2 had data ).</p>
  <p>The file which i want to replace data using id is below
  <a href="https://store8.gofile.io/download/6e13a19a-bac8-4d16-8692-e4435eed2a08/Serp.csv" rel="nofollow noreferrer">https://store8.gofile.io/download/6e13a19a-bac8-4d16-8692-e4435eed2a08/Serp.csv</a>
  Highlighted part need to be deleted after filling location.
  <a href="https://i.stack.imgur.com/Ws3So.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ws3So.png" alt="Deleting after filling location" /></a></p>
  <pre><code>import pandas as pd 
  
  df1= pd.read_excel(&quot;serp.xlsx&quot;, header=None)
  df2= pd.read_excel(&quot;flocnam.xlsx&quot;, header=None)
  df1 = df1[0].str.split(&quot;;&quot;, expand=True)
  
  
  
  df1[4] = df1[4].apply(lambda x: v[-1] if (v := x.split()) else &quot;&quot;)
  
  df2[1] = df2[1].apply(lambda x: x.split(&quot;-&quot;)[0])
  
  
  m = dict(zip(df2[1], df2[0]))
  df1[4]= df1[4].replace(m)
  
  
  print(df1)
  df1.to_csv (&quot;test.csv&quot;)
  </code></pre>
  <p>It worked but not how i wanted.
  <a href="https://store8.gofile.io/download/c0ae7e05-c0e2-4f43-9d13-da12ddf73a8d/test.csv" rel="nofollow noreferrer">https://store8.gofile.io/download/c0ae7e05-c0e2-4f43-9d13-da12ddf73a8d/test.csv</a></p>
  <p><a href="https://i.stack.imgur.com/3D1B7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3D1B7.png" alt="Test working but need some help more" /></a></p>
  <p>trying to replace it like this.(desired output)</p>
  <p><a href="https://i.stack.imgur.com/EdfXU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EdfXU.png" alt="enter image description here" /></a></p>
  <p>Thank you for being Supportive community❤️</p>