
Python
zengchengxi
耗子尾汁!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python的you-get报错‘vd_source‘不是内部或外部命令,也不是可运行的程序
原创 2023-08-20 17:44:50 · 5391 阅读 · 6 评论 -
How to Solve Python AttributeError: ‘DataFrame’ object has no attribute ‘concat’
AttributeError: ‘DataFrame’ object has no attribute ‘concat’原创 2022-06-13 21:05:45 · 10235 阅读 · 3 评论 -
安装sklearn报错 ERROR: Could not install packages due to an EnvironmentError
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\10647\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python38\\site-packages\\sklear..转载 2020-11-27 12:42:47 · 664 阅读 · 0 评论 -
Python七彩管实现某个时刻的倒计时(如:北京奥运会倒计时)
import turtle, time# 七彩管间距def drawgap(): turtle.penup() turtle.fd(5)# 绘制单根七彩管def drawline(draw): drawgap() turtle.pendown() if draw else turtle.penup() turtle.fd(40) drawgap() turtle.right(90)# 按照数字的特性绘制七彩管def drawdig.原创 2020-10-30 11:46:23 · 1546 阅读 · 0 评论 -
Python根据表格每行数据,匹配在txt文章中出现的次数统计
用途:根据表格每行数据,匹配在txt文章中出现的次数统计示例:注意事项:1. 环境:pip install re & pandas & xlrd; python 3;2. 表格第一行会被忽略,往下才是关键词;关键词页放在第一个表单,最好只有这一个表单;3. 表格与TXT文件都放在.py同级目录,或者在代码中显示绝对路径;import reimport pandas as pdimport xlrd# 读取匹配关键字表格并输出为列表(忽略...原创 2020-10-29 16:58:18 · 646 阅读 · 0 评论 -
Python 汉诺塔(8行代码)
# 汉诺塔 hanoi 递归解法def hanoi(n, a, b, c): if n == 1: print(a, ' ---> ', c) # 如果一个盘子则直接从a移动到c else: hanoi(n - 1, a, c, b) # 借助c把前n-1个盘子从a移动到b print(a, ' ---> ', c) ...原创 2018-09-12 12:16:18 · 227 阅读 · 0 评论