首页
  1. 首页
  2. 文章
  • 2020年3月25日 09:54

    python3 RuntimeError: dictionary changed size during iteration

    刚刚切换使用python3.8没有多久,使用dict.keys()提示错误:RuntimeError: dictionary changed size during iteration经过查询发现在python3.8中,dict.keys()返回的不再是一个列表,而是一个可迭代(不是迭代器)。所以如果还想要使用.keys()方法d = {'a': 1, 'b': 2, 'c':3, 'd':4} for&nbs

    python 3793 人阅读 0 条评论
    阅读全文
  • 2020年3月24日 14:59

    mymongo 基础操作

    插入数据import datetime import pymongo from pymongo import MongoClient mclient = MongoClient('192.168.3.110', 27017, connect=False) mdb = mclient.test_database posts=mdb.posts new_posts = [{"author": "Mike&qu

    mongodb 2020 人阅读 0 条评论
    阅读全文
  • 2020年3月24日 10:45

    selenium ChromeDriver及ChromeDriver下载链接

    selenium  ChromeDriver及ChromeDriver下载链接

    爬虫 2159 人阅读 0 条评论
    阅读全文
  • 2020年3月10日 11:29

    python mongodb检查文档是否存在(return True if document exists)

    作为一名mongodb初学者,经常需要在插入数据之前需要检查指定集合下,指定文档是否存在,翻了N久的文档。发现最新版的mongodb出了一个新方法:db.collection.countDocuments()count_documents ——不过该功能只在mongodb 4.0.3和python3.7之后才支持。

    mongodb 3076 人阅读 0 条评论
    阅读全文
  • 2020年3月4日 09:20

    pandas Series/DataFrame获取n个最大值(largest values)和n个最小值((smallest values))

    使用pandas时,想要获取一个序列中最大的N个值,和最小N个数值经过查阅,pandas自带两个方法可以直接获取最大:nlargest和最小:nsmallest。

    python 7622 人阅读 0 条评论
    阅读全文
  • 2020年3月3日 17:28

    pandas series.str.sum 在求和时忽略到非法(错误)的数据解决方法

    pandas series.str.sum 在求和时忽略到非法(错误)的数据解决方法。背景:我想求一个列表套字典中某一个字段累积求和,但是这个字段中会出现脏数据。

    python 2409 人阅读 0 条评论
    阅读全文
  • 2020年3月2日 15:00

    pandas series使用reindex 返回Nan

    在pandas使用reindex时,发现新的索引返回的值都是Nan,结果查阅文档发现原来是自己方法用错了,我原本想的是替换索引,而reindex作用是填充索引。如:import pandas as pd test = pd.Series([1,2,3], index = ['a','b','c']) test = test .reindex

    python 2790 人阅读 2 条评论
    阅读全文
  • 2020年3月2日 14:49

    pandas series/DataFrame 更换索引

    pandas series/DataFrame 更换索引a = [{"content": "1", "title": "刘德华", "info": "", "time": 1578877014},      {"content": "2", "tit

    python 3390 人阅读 0 条评论
    阅读全文
  • «
  • 1 (current)
  • »
网站分类
  • redis
  • python
  • Django
  • JavaScript
  • mysql
  • 爬虫
  • Flask
  • Linux
  • 计算机原理
  • leetcode
  • 开发工具
  • mongodb
  • seo
  • django教程
  • mac
  • golang
点击排行
  • nginx 启动时报错Starting nginx (via systemctl): nginx.serviceJob for nginx.service failed 解决方法
  • python os模块获取指定文件夹下所有文件名
  • mac 安装Homebrew提示brew command not found错误的解决方法
  • ubuntu 查看当前系统登录用户名单
  • python 定时任务APScheduler 使用介绍
  • python2 安装pandas提示错误:Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  • VMware 安装VMware Tools显示灰色正确解决办法
  • 10进制颜色代码,十进制颜色查询对照表
  • gitlab 打开页面出现502错误解决办法
  • 苹果 Mac OS 系统 v2rayU 使用教程
搜索
文章归档
  • 2022年5月 (4)
  • 2022年4月 (12)
  • 2022年3月 (17)
  • 2022年2月 (5)
  • 2022年1月 (1)
  • 2021年12月 (12)
  • 2021年11月 (2)
  • 2021年10月 (6)
  • 2021年9月 (16)
  • 2021年8月 (9)
  • 2021年7月 (6)
  • 2021年6月 (8)
  • 2021年5月 (6)
  • 2021年4月 (19)
  • 2021年3月 (21)
  • 2021年2月 (23)
  • 2021年1月 (8)
  • 2020年12月 (3)
  • 2020年11月 (12)
  • 2020年10月 (6)
  • 2020年9月 (25)
  • 2020年8月 (27)
  • 2020年7月 (11)
  • 2020年6月 (16)
  • 2020年5月 (19)
  • 2020年4月 (18)
  • 2020年3月 (9)
  • 2020年2月 (24)
  • 2020年1月 (17)
  • 2019年12月 (14)
  • 2019年11月 (20)
  • 2019年10月 (19)
  • 2019年9月 (16)
  • 2019年8月 (25)
  • 2019年7月 (20)
  • 2019年6月 (11)
  • 2019年5月 (3)
  • 2019年4月 (13)
  • 2019年3月 (14)
  • 2019年2月 (30)
  • 2019年1月 (13)
  • 2018年12月 (85)
  • 2018年11月 (662)
标签列表
  • sqlalchemy (9)
  • git (1)
  • zookeeper (1)
  • ubuntu (1)
  • selenium (20)
  • nginx (2)
  • layui (1)
  • jieba (1)
  • xlrd (1)
  • xlwd (1)
  • 百度云 (2)
  • pycharm (4)
  • 排序算法 (1)
  • pandas (5)
  • PostgreSQL (1)
  • zennoposter (2)
  • gunicorn (6)
  • OpenWRT (9)
  • frp (2)
  • django orm (2)
  • gitlab (1)
  • 友情链接
  • Github
  • 诗词网
  • 诗词网
Copyright © www.chenxm.cc 个人博客模板 All Rights Reserved. 备案号: 粤ICP备12087819号-1