随笔分类 -  Python

摘要:Linux下安装Python3.6和第三方库 如果本机安装了python2,尽量不要管他,使用python3运行python脚本就好,因为可能有程序依赖目前的python2环境, 比如yum!!!!! 不要动现有的python2环境! 一、安装python3.6 1. 安装依赖环境 # yum -y 阅读全文
posted @ 2018-01-12 10:05 糖饼好吃 阅读(409) 评论(0) 推荐(0)
摘要:Pandas: 透视表 pivot_table(df,index,values) 阅读全文
posted @ 2017-06-23 15:38 糖饼好吃 阅读(163) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/fnng/p/3670789.html#coding=utf-8from time import ctime,sleepimport threadingdef music(func): for i in range(2): print "I was listen to %s. %s" %(func,ctime()) s... 阅读全文
posted @ 2017-01-17 14:35 糖饼好吃 阅读(98) 评论(0) 推荐(0)
摘要:生成200个10位的随机数(生成优惠券):__author__ = 'friday'import randomdef creat_num(num,long): str = 'qwertyuiopasdfghjklzxcvbnm1234567890!@#$%^&*_+' b = [] for i in range(num): a = '' for j i... 阅读全文
posted @ 2017-01-17 14:33 糖饼好吃 阅读(195) 评论(0) 推荐(0)
摘要:https://pypi.python.org/pypi/MySQL-python/1.2.4 (在这下载mysql模块)python 操作mysql数据库基础#coding=utf-8import MySQLdb conn= MySQLdb.connect( host='127.0.0.1', port = 3306, user='root', ... 阅读全文
posted @ 2017-01-17 14:32 糖饼好吃 阅读(111) 评论(0) 推荐(0)