Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to remove data from mongo db python

import pymongo

myclient = pymongo.MongoClient("mongodb://localhost:27017/")
mydb = myclient["mydatabase"]
mycol = mydb["customers"]

myquery = { "address": "Mountain 21" }

mycol.delete_one(myquery)
Comment

PREVIOUS NEXT
Code Example
Python :: Savefig cuts off title 
Python :: python sum of digits in a string 
Python :: how to change dtype object to int 
Python :: resize multiple images to same size python 
Python :: combining list of list to single list python 
Python :: python multiply all elements in array by constant 
Python :: how to set required drf serialzier 
Python :: python imread multiple images 
Python :: python write to text file with new line 
Python :: python negative infinity 
Python :: web scraping linkedin profiles python jupyter 
Python :: How to add card in trello API using python 
Python :: python check if string is a float 
Python :: how to delete the last item in a list python 
Python :: most frequent element in a list 
Python :: python write list to text file 
Python :: python subtract 2 strings 
Python :: invoice parsing ocr python 
Python :: table python 
Python :: opencv get contours 
Python :: python class get attribute by name 
Python :: install log21 python 
Python :: pandas drop columns by index 
Python :: python cube root 
Python :: colored text python 
Python :: nlargest 
Python :: type hint tuple 
Python :: how to use colorama 
Python :: file to lowercase python 
Python :: qtextedit get text 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =