title: Delete an item from DictRow
body: <p>Is there a clean way to delete an item (both its value and index) from a <code>psycopg2</code> <code>DictRow</code> object?</p>
  
  <p>I am using <code>psycopg2</code> to interact with two different postgresql databases. I want to copy a record as a DictRow from one database to the other - <em>and</em> I want to delete a couple of fields from the records before inserting them.</p>
  
  <p>For example, if I have a DictRow called <code>row</code>:</p>
  
  <pre><code>&gt;&gt;&gt; print row
  [12, '2015-12-31', 'kefir sriracha put a bird on it']
  
  &gt;&gt;&gt; print row.keys()
  ['id', 'created_at', 'output_example']
  </code></pre>
  
  <p>Using <code>row.pop(INDEX)</code> changes the indices of the list, so the keys stored in the <code>row._index</code> attribute are no longer correct!</p>
  
  <pre><code>&gt;&gt;&gt; row.pop(0)
  12
  
  &gt;&gt;&gt; print row
  ['2015-12-31', 'kefir sriracha put a bird on it']
  
  &gt;&gt;&gt; print row.keys()
  ['id', 'created_at', 'output_example']
  
  &gt;&gt;&gt; print row['id']
  '2015-12-31' # GAAAAA!!!
  </code></pre>
  
  <p>You can't use use <code>del row['id']</code>: <code>TypeError</code>. I presume this is because the underlying object is a <code>list</code> and expects an integer index. </p>
  
  <p>My current workaround is to do something like this, which seems inelegant:</p>
  
  <pre><code>fields = [f for f in row.keys() if f != 'id']
  values = [v for k, v in row.iteritems() if k != 'id']
  </code></pre>
  
  <p>Any suggestions for a more direct way of deleting an item from a DictRow? </p>