python
文章平均质量分 52
每天一个小脚印
深耕自己
展开
-
shell perl tcl python使用记录
1、shell perl tcl在给定路径下抓取文件名称的方法:shell和perl均可以使用反引号 `ls path_name` 即可得到给定path下的文件列表。在tcl中需要利用find来查找符合某一名称的文件:find path_name(可以使用通配符) -name file_name...原创 2021-04-02 09:35:27 · 435 阅读 · 0 评论 -
perl,tcl 和 python的文件处理
工作中perl,tcl,python混用,导致三种语言的用法经常记混,所以在此贴中记录三种语言处理文件的用法,方便查询。原创 2021-01-20 11:29:55 · 3054 阅读 · 0 评论 -
python快捷操作记录
crtl+/:注释多行crtl+Alt+l:代码规范原创 2020-10-31 21:02:55 · 123 阅读 · 0 评论 -
列表,元组,字典,集合的特点
列表:元组:字典:集合:原创 2020-10-23 11:31:25 · 2878 阅读 · 0 评论 -
python100题实训------菜鸟教程
sample2:# -*- coding:UTF-8 -*-import sysrevenue = int(sys.argv[1])grad = [1000000,600000,400000,200000,100000,0]ratio = [0.01,0.015,0.03,0.05,0.075,0.1]sum = 0for i in range(0,6): if revenue > grad[i]: sum = sum + (revenue - grad[i]) * r原创 2020-08-27 10:31:01 · 541 阅读 · 0 评论 -
win10安装tushare
http://tushare.org/index.html#id4tushare官网,里面有教如何安装。打开cmd,输入pip install tushare,等待下载,安装。这玩意给我打包安装了辣么多东西。。。。。。。。。好歹安装上了,学习怎么使用。...原创 2018-11-24 00:23:30 · 1446 阅读 · 0 评论 -
pip Windows10下载安装
安装python。我已经安装完成,就不再赘述。https://pypi.org/project/pip/#downloads下载安装包。点击Download files。下载Source文件。打开cmd,进入存储位置。利用python setup.py install进行安装。安装完成后,可以运行pip list试一下。如果没有成功,需要配置环境变量。...原创 2018-11-24 00:08:29 · 1235 阅读 · 0 评论 -
pandas中DataFrame利用loc截取部分数据,end_date和start_date
def attribute_daterange_history(security,start_date,end_date,fields=('open','close','high','low')): daily = pro.daily(ts_code=security) daily.to_csv(security+'.csv') daily_cal...原创 2018-12-26 22:05:02 · 5437 阅读 · 1 评论 -
pandas学习笔记1
pandas使用:1、数据结构2、创建对象3、查看数据4、选择数据5、赋值数据一、数据结构:pandas主要的两种数据结构:Dimensions name Descriptions 1 Series 1维标记同类型数组 2 DataFrame 通常是2维,大小可变的表格结构 pandas数据结构是低维数据的灵活组合。D...原创 2018-12-02 11:35:59 · 388 阅读 · 0 评论 -
python知识点积累
1、将datetime数据变为int型,例如20160606变为int型数据。首先将数据变为str型,在变为int类型。int_end_date = int(end_date.strftime("%Y%m%d"))2、将int数据变为datetime型,例如20160606变为datetime型数据。这里要用到parse解析。首先将数据变为str型,在变为datetime类型。...原创 2018-12-26 21:49:28 · 133 阅读 · 0 评论 -
python-2048游戏代码
# -*- coding: UTF-8 -*-import numpy as npimport randomdef down(group): #相同项相加 for j in range(0,4): for i in range(3,-1,-1): if group[i][j] != 0: i...原创 2019-09-24 22:17:07 · 729 阅读 · 0 评论