首页 > 行业图谱 >

- python—时间与时间戳之间的转换
2017-03-25
-
python—时间与时间戳之间的转换
对于时间数据,如2016-05-05 20:28:54,有时需要与时间戳进行相互的运算,此时就需要对两种形式进行转换,在Python中,转换时需要用到time模块,具体的操作有如下的几种:
将 ...

- python数据分析笔记—数据加载与整理
2017-02-18
-
python数据分析笔记—数据加载与整理
数据加载
导入文本数据
1、导入文本格式数据(CSV)的方法:
方法一:使用pd.read_csv(),默认打开csv文件。
9、10、11行三种方式均可以导入文本 ...

- python生成word中文字体
2017-01-16
-
python生成word中文字体
我们今天用python生成word文件,主要是用到了PyRTF包生成rtf文件,由于PyRTF的包中文教程比较少,所以特此记录几篇文章,也希望给大家有一些帮助。
开始碰到一个问题,就是不能 ...

- python 私有属性和方法
2017-01-16
-
python 私有属性和方法
python默认的成员函数和成员变量都是公开的,并且没有类似别的语言的public,private等关键词来修饰。 在python中定义私有变量只需要在变量名或函数名前加上 \"__\"两个下划线,那么这个 ...

- python数据挖掘之决策树DTC数据分析及鸢尾数据集分析
2020-04-20
-
Python数据挖掘之决策树DTC数据分析及鸢尾数据集分析
今天主要讲述的内容是关于决策树的知识,主要包括以下内容:1.分类及决策树算法介绍2.鸢尾花卉数据集介绍3.决策树实现鸢尾数据集分析。希望这篇文章 ...

- python内置的urllib模块不支持https协议的解决办法
2017-01-05
-
python内置的urllib模块不支持https协议的解决办法
Django站点使用django_cas接入SSO(单点登录系统),配置完成后登录,抛出“urlopen error unknown url type: https”异常。寻根朔源发现是python内置的urlli ...

- python模块及包的导入_python 导入模块
2017-01-05
-
python模块及包的导入_python 导入模块
一 .module
通常模块为一个文件,直接使用import来导入就好了。可以作为module的文件类型有”.py”、”.pyo”、”.pyc”、”.pyd”、”.so”、”.dll”。
二. pack ...

- python:open/文件操作_python open 文件操作
2017-01-04
-
python:open/文件操作_python open 文件操作
open/文件操作
f=open(‘/tmp/hello’,’w’)
#open(路径+文件名,读写模式)
#读写模式:r只读,r+读写,w新建(会覆盖原有文件),a追加,b二进制文件.常用模式
...

- 在python中添加自定义模块_python导入自定义模块
2017-01-04
-
在Python中添加自定义模块_python导入自定义模块
一般来说,我们会将自己写的python模块与python自带的模块分开存放以达到便于维护的目的。
Python 运行环境在查找库文件时是对 sys.path 列表进行遍历,如果 ...

- python 详解re模块_python re_正则表达式
2017-01-03
-
python 详解re模块_python re_正则表达式
正则表达式的元字符有. ^ $ * ? { [ ] | ( )
.表示任意字符
[]用来匹配一个指定的字符类别,所谓的字符类别就是你想匹配的一个字符集,对于字符集中的字符可以理 ...

- 深入解析python编程中JSON模块的使用_python json模块详解
2017-01-02
-
深入解析Python编程中JSON模块的使用_python json模块详解
这篇文章主要介绍了深入解析Python编程中JSON模块的使用,举例讲解了如何使用Python解析JSON数据,需要的朋友可以参考下
JSON编码支持的基本数据类型为 ...

- python 多线程_python 多线程并发_python 多线程爬虫
2017-01-01
-
Python 多线程_python 多线程并发_python 多线程爬虫
多线程类似于同时执行多个不同程序,多线程运行有如下优点:
使用线程可以把占据长时间的程序中的任务放到后台去处理。
用户界面可以更加吸引人,这样比如 ...

- python GUI编程(Tkinter)_python gui tkinter
2017-01-01
-
python GUI编程(Tkinter)_python gui tkinter
python提供了多个图形开发界面的库,几个常用Python GUI库如下:
Tkinter: Tkinter模块(“Tk 接口”)是Python的标准Tk GUI工具包的接口.Tk和Tkinter可以在大多数 ...

- python 异常处理_python 抛出异常_python 异常捕获
2017-01-01
-
Python 异常处理_python 抛出异常_python 异常捕获
python提供了两个非常重要的功能来处理python程序在运行中出现的异常和错误。你可以使用该功能来调试python程序。
异常处理: 本站Python教程会具体介绍。
断 ...

- python 模块_python 模块安装_python 模块下载_python学习
2017-01-01
-
Python 模块_python 模块安装_python 模块下载_python学习
模块让你能够有逻辑地组织你的Python代码段。
把相关的代码分配到一个 模块里能让你的代码更好用,更易懂。
模块也是Python对象,具有随机的名 ...

- python 元组_python元组操作_添加元素_python 元组转字符串
2016-12-31
-
Python 元组_python元组操作_添加元素_python 元组转字符串
Python的元组与列表类似,不同之处在于元组的元素不能修改。
元组使用小括号,列表使用方括号。
元组创建很简单,只需要在括号中添加元素,并使用逗 ...

- python 字典(Dictionary)_ python字典操作_python dictionary
2016-12-31
-
Python 字典(Dictionary)_ python字典操作_python dictionary
字典是另一种可变容器模型,且可存储任意类型对象。
字典的每个键值(key=>value)对用冒号(:)分割,每个对之间用逗号(,)分割,整个字典包括在花 ...

- python 日期和时间_python 当前日期时间_python日期格式化
2016-12-31
-
Python 日期和时间_python 当前日期时间_python日期格式化
Python程序能用很多方式处理日期和时间,转换日期格式是一个常见的功能。
Python 提供了一个 time 和 calendar 模块可以用于格式化日期和时间。
...

- python While循环语句_python基础教程
2016-12-31
-
Python While循环语句_python基础教程
Python编程中 while 语句用于循环执行程序,即在某条件下,循环执行某段程序,以处理需要重复处理的相同任务。其基本形式为:
while判断条件:执行语句……
执行语 ...

- python 运算符_python 运算符重载_python 逻辑运算符_python 运算符优先级
2016-12-30
-
Python 运算符_python 运算符重载_python 逻辑运算符_python 运算符优先级
什么是运算符?
本章节主要说明Python的运算符。举个简单的例子 4 +5 = 9 。 例子中,4 和 5 被称为操作数,”+” 称为运算符。
Pyth ...