![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
poluente
这个作者很懒,什么都没留下…
展开
-
python excel创建kml文件
一 创建excel文件def tobe_excel(result, name_cn): import xlwt work_book = xlwt.Workbook(encoding='utf-8') work_sheet = work_book.add_sheet("sheet1", cell_overwrite_ok=True) # for i in xrange(len(titlelist)): # sheet.write(1, i, titlel原创 2021-03-12 15:29:42 · 1174 阅读 · 0 评论 -
matplotlib 画图 --折线图 和 解决中文乱码的问题(ubuntu)
1.模块from matplotlib import pyplot as pltfrom pylab import *import numpy as np2.画图# x, y轴x = np.array([1, 2, 3, 4, 5, 6, 7, 8])y = np.array([1, 2, 3, 4, 5])# 设置画布大小 1200*600plt.figur...原创 2019-10-31 09:57:13 · 672 阅读 · 0 评论 -
hbase存储和读取
一 存储1. 连接数据库# 连接数据库bd_hb_connpara = { 'host': '192.168.9.999', 'port': 9090, 'rest_port': 8090, }2. 存储 (第一种)import happybase as hpbtry: ...原创 2019-10-24 16:37:17 · 232 阅读 · 0 评论 -
python 四舍五入
1.round 四舍五入(真实是“四舍六入五成双”)round(3.4)==>3round(3.5)==>4# 指定小数位数取值round(3.5554, 3)==>3.555round(3.5555, 3)==>3.556# 取第几位,如果取得那位后面是5,取得那位是奇数,则舍, 取得那位是偶数,则入print(round(3.46...原创 2019-10-09 19:36:49 · 286 阅读 · 0 评论