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

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
Selecting the lowest/highest with find_one in Pymongo
Safe use of Pymongo's find_one

Categories

HOME
hdfs
website
out-of-memory
tabs
swift2
sympy
telegraf
swarm
driver
match
locationmanager
colors
powermock
stimulsoft
max-msp-jitter
jest
spyder
anova
weex
batch-rename
uislider
generator
ava
eclipse-emf
basex
intune
d3.js-v4
autodesk-model-derivative
objectmapper
mapnik
spring-rabbitmq
des
cargo
eclipse-gmf
utf
python-jira
grails-spring-security
hdiv
minikube
latexml
react-intl
xcode8.2
adblock
roracle
libreoffice-writer
photoswipe
uiautomatorviewer
nusoap
palindrome
word-2007
deedle
mobile-angular-ui
.when
msxml
deviare
streamwriter
okio
s-function
jsf-2.3
perforce-integrate
utf-16
gravatar
lovefield
helm
decidable
bjam
google-gdk
scala-macros
android-audiomanager
incron
symja
datagridcomboboxcolumn
cout
dmake
aho-corasick
communicate
maven-central
accessory
windows-messages
thruway
bittorrent-sync
map
nosql-aggregation
san
unrealscript
insertonsubmit
postgres-xc
onconfigurationchanged
story
nsmutablestring
live-wallpaper
kaazing
gamesalad
java.lang.class
mkannotation
type-safety
haiku
filelock
kernel32
nsconnection
printqueue
eaccelerator
jdownloader
icicles
urchin
yahoo-maps
jquery-effects
eai
tso
motif
stretchblt
jboss-mdb
suggestbox
acceleration
jvm-bytecode
synthesizer

Resources

Encrypt Message