What is the $project (aggregation) API for Pymongo?
<p>I'm rather new to MongoDB, I can find some commands in shell to execute my query, however, I can not find a proper function in PyMongo API manual. </p>

<p>For example, I would like to project some of the fields of the document to a new document. I suppose the $project could do it, but there is no such support in Pymongo. How could I execute the same query both in shell and Python? For example:</p>

<pre><code>db.books.aggregate( [ { $project : { title : 1 , author : 1 } } ] )
</code></pre>