pymongo


Pymongo error : 'Cursor' object has no attribute 'find' , how to filter it?


I want to query data from mongo and filter them to many stacks
The logic is like:
objs = collection.find({"name":"BOB"})
t_list = ["Math","History"]
for t in t_list :
subjects = objs.find({{"subjects":t}})
# do_somethig(subjects)
But pymongo will raise error AttributeError: 'Cursor' object has no attribute 'find'
I want to know can pymongo do this ?? ( query one time and then filter the data I want??)

Related Links

Get OperationFailure error with PyMongo 2.7.1
Inserting string as regular string in mongodb
Mongos + Pymongo 2.5 ==>No suitable hosts found
pymongo collection add item using update
How to convert objectid to string
Conditional atomic mongo remove with different results
python script to connect to mongodb master
flask-admin and pymongo search
Running code when mongoengine loads a document
Can't replace mongo document
How do I call a function with pymongo using webpy?
python motor offers fetch_next exception on aggregation
python motor mongo cursor length or peek next
PyMongo check if update succeeded
insert and query an OrderedDict in MongoHQ
Return .str of ObjectID using pymongo

Categories

HOME
python-2.7
powerbi
svn
automapper
freeradius
functional-programming
systemd
website
iverilog
typeerror
bing-search
autocomplete
dronekit-python
visualforce
fedora
anchor
polymer-2.x
locationmanager
parsley.js
mailgun
global-variables
reselect
mixpanel
playframework-2.0
cocos2d-android
codefluent
raml
wsf
cmake-gui
social-tables
pst
fido-u2f
kamailio
intel
channel
data-collection
network-analysis
envoy
cloudera-manager
apptentive
grails-2.5
dreamfactory
assertions
djcelery
telephonymanager
sspi
assert
assemblies
task-parallel-library
optionaldataexception
latexml
reverse-dns
linq-to-excel
icecast
popen
network-protocols
maatwebsite-excel
allegro
nunit-console
fiber
right-to-left
timestamping
vim-plugin
json-spirit
mixins
knife
featuretoggle
roxygen2
embeddedwebserver
ocmockito
console.log
deque
dnsjava
inputbox
code-complexity
miglayout
preorder
cidr
wso2bam
eclim
hints
unicoins
gprof
acpi
dynamic-c
asio
play2-mini
data-dump
ognl
mongrel2
git-log
turbine
activestate
external-sorting
tso

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App