title: Pandas - Input text into a column based on blank cells in a different column
body: <p>Here is my code:    </p>
  
  <pre><code>    finalCSV = pd.read_csv('pathName') #Open new CSV
  #create col for isMAP based on true or false
      finalCSV['isMap'] = np.where(finalCSV['MAP'] == finalCSV['productPrice'], 'True', 'False')
      finalCSV = finalCSV.sort_values(by = ['isMap'], ascending = True,) #Make it so the falses come out first
  
  if finalCSV['productSKU'].isna().all():
       finalCSV['isMap'].str.replace('False' ,'N/A')
  finalCSV.to_csv('pathName', index = False) #Close and overwrite CSV
  </code></pre>
  
  <p>Here is the image of the csv file I'm working with 
  <a href="https://i.stack.imgur.com/vyNJV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vyNJV.png" alt="enter image description here"></a></p>
  
  <p>What I want to do is input the text N/A on the column 'isMap' if the adjacent cell from 'productSKU' is null. However when I run my code snippet, the excel file keeps 'FALSE' instead of N/A</p>
  
  <p>Edit: Here is the link to my CSV </p>
  
  <p><a href="https://drive.google.com/file/d/10Xnw33SbYmEgPC-UUBjJvrDMf0XfVtdq/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/10Xnw33SbYmEgPC-UUBjJvrDMf0XfVtdq/view?usp=sharing</a></p>
  
  <p><strong>Some Extra Clarification</strong></p>
  
  <p>The first 3 columns are given, productName, productOMS, productPrice, productSKU, and productURL are all items that I got with my webscraper. isMap is a column that I'm creating in this program then dynamically filling it in with results.</p>
  
  <p>So </p>
  
  <pre><code>if MAP == productPrice, isMap would return true
  if MAP != productPrice isMap would return false
  </code></pre>
  
  <p>Now if my webscraper failed to get a productSKU and/or productName, then it would mean that the product does not exist on the website </p>
  
  <pre><code>if productSKU is NULL, isMap would return not available
  </code></pre>
  
  <p>Here is the DataFrame Head:</p>
  
  <pre><code>{'SKU': {0: 'FRC5131-WM-33', 275: 'KECOM-36', 276: 'DW-BS-24', 277: 'BS655N-48', 278: '8654WM-36'}, 
  
  'MAP': {0: nan, 275: 779.95, 276: nan, 277: 1299.95, 278: 1295.95}, 
  
  
  'productSKU': {0: nan, 275: nan, 276: nan, 277: nan, 278: nan}, 
  
  
  'productPrice': {0: nan, 275: nan, 276: nan, 277: nan, 278: nan}, 
  
  
  'productName': {0: nan, 275: nan, 276: nan, 277: nan, 278: nan}, 
  
  'HOME DEPOT (OMSID)': {0: 312962522, 275: 206922074, 276: 308581002, 277: 312332575, 278: 309618527}, 
  
  'productURL': {0: 'https://www.homedepot.com/p/312962522', 275: 'https://www.homedepot.com/p/206922074', 276: 'https://www.homedepot.com/p/308581002', 277: 'https://www.homedepot.com/p/312332575', 278: 'https://www.homedepot.com/p/309618527'}, 
  
  'isMap': {0: 'False', 275: 'False', 276: 'False', 277: 'False', 278: 'False'}, 
  
  'productOMS': {0: 312962522, 275: 206922074, 276: 308581002, 277: 312332575, 278: 309618527}}
  </code></pre>