Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better tha ...
分类:
编程语言 时间:
2021-04-13 12:03:32
阅读次数:
0
Python 中的 numpy 包 和 pandas 包都能够计算均值、方差等,本文总结一下它们的用法。 #1. Numpy 计算均值、方差、标准差 一般的均值可以用 numpy 中的 mean 方法求得: >>> import numpy as np >>> a = [5, 6, 16, 9] > ...
分类:
编程语言 时间:
2021-04-13 12:00:51
阅读次数:
0
#coding:utf-8 import xlrd,requests file_name = r"F:\pythonScript\map_dp\data_center\data_config\second_disaster_of_agriculture_and_natural_gas.xls" wo ...
分类:
编程语言 时间:
2021-04-13 11:59:05
阅读次数:
0
前面,我们学习了文件的读(read)和写(write),都是用open()方法打开文件并获取文件流。然后在读或写操作完成后进行流的关闭(close).有时候,最后的流关闭很容易被忽略,从而导致了内存泄漏的问题。 今天要说的就是with,用于自动关闭流。 用法:with open(file, mode ...
分类:
编程语言 时间:
2021-04-13 11:57:38
阅读次数:
0
1 def find_worldByName(c_name,continent): 2 print(c_name) 3 print(continent) 4 sql = " SELECT * FROM world WHERE 1=1 " 5 if(c_name!=None): 6 sql=sql+" ...
分类:
数据库 时间:
2021-04-12 12:45:06
阅读次数:
0
Python 2.7.9 + 或 Python 3.4+ 以上版本都自带 pip 工具。pip 官网:https://pypi.org/project/pip/你可以通过以下命令来判断是否已安装:pip --version # Python2.x 版本命令pip3 --version # Pytho ...
分类:
编程语言 时间:
2021-04-12 12:40:16
阅读次数:
0
Pandas入门详细教程 01 关于pandas pandas,python+data+analysis的组合缩写,是python中基于numpy和matplotlib的第三方数据分析库,与后两者共同构成了python数据分析的基础工具包,享有数分三剑客之名。 正因为pandas是在numpy基础上 ...
分类:
其他好文 时间:
2021-04-12 12:27:06
阅读次数:
0
前面我们已经学习了for循环,今天再带着大家讲述一下while循环。那么for循环和while循环,到底有什么区别呢? Python中for循环和while循环本质上是没有区别的,但是在实际应用上,针对性不太一样。 for循环,主要应用在遍历中,体现的是遍历二字; while循环,主要用于判断符合条 ...
分类:
编程语言 时间:
2021-04-12 12:16:44
阅读次数:
0
#!/usr/bin/python3 import time import hmac import hashlib import base64 import urllib.parse import os timestamp = str(round(time.time() * 1000)) secre ...
分类:
编程语言 时间:
2021-04-12 12:15:47
阅读次数:
0
GitHub - uber/petastorm https://github.com/uber/petastorm/ 版本: Windows 10 Python 3.7.0 petastorm 0.9.8 pyarrow 3.0.0 编写test.py from petastorm import m ...
分类:
其他好文 时间:
2021-04-12 12:12:33
阅读次数:
0