Pymongo中的isalpha()等效是什么?
我在 pymongo中有一个字段,名称为“ processed_email_body ”。我如何检查它是否包含任何字母,基本上我的目标是找到空处理的电子邮件体的数量,因为空的封面仅包含点,而没有其他。因此,如果身体没有任何字母,我将继续增加计数。
到目前为止,我被困在这里:
iid = 11651704
database_69.user_emails.find({"Message_Id": iid, "Processing_Variables": {"Processed_Email_Body": }})
有什么想法要进一步吗?
I have a field in pymongo by the name "Processed_Email_Body". How do I check if it contains any letters or not, basically my objective is to find the count of empty processed email bodies, as the empty ones only contain dots and nothing else. So if the body does not have any letters, I will keep incrementing the count.
As of now I am stuck here:
iid = 11651704
database_69.user_emails.find({"Message_Id": iid, "Processing_Variables": {"Processed_Email_Body": }})
Any ideas to proceed further?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一种使用仅
的文档。如果需要,您可以在过滤器中提供更多字段(例如,
不同。“ message_id”
)。另请注意,您可能需要在python中“逃脱”。
“ $ REGEX”尝试一下 mongoplayground.net.net 。
这是获取“空处理的电子邮件主体的计数”的一种方法。
在
Here's one way to return docs with only
.
(one or more) in"Processing_Variables.Processed_Email_Body"
. You can provide more fields in the filter if you want (e.g.,"Message_Id"
). Also note that you may need to "escape" the.
in the"$regex"
differently in Python.Try it on mongoplayground.net.
Here's a way to get the "count of empty processed email bodies".
Try this on mongoplayground.net.