title: Mask information in CSV file using sha256 in Python
body: <p>I have a CSV file that contains <code>Name</code>, <code>Address</code>, and <code>Password</code>. I want to mask <code>Address</code> and <code>password</code> using sha256 in Python.</p>
  
  <p>Here is what I have tried so far:</p>
  
  <pre><code>import hashlib
  import csv
  
  def hash_pw(input_file_name, output_file_name): 
      hash_lookup = {} 
  
      with open(input_file_name, newline='') as f_input, open(output_file_name, 'w', newline='') as f_output: 
          csv_input = csv.reader(f_input)
          csv_output = csv.writer(f_output) 
  
          for user, hash in csv_input: 
              csv_output.writerow([user, hash_lookup[hash]]) 
  
  hash_pw('input.csv', 'output.csv')
  </code></pre>
  
  <p>I don't know how to specify to mask only address and password columns?</p>
  
  <p>Any help would be appreciated. Thank you   </p>