10 2019 档案
摘要:经典4P理论:以产品为核心 经典4C理论:以消费者为中心 互联网新理论:3C3P
阅读全文
摘要:select group_concat(分公司) as 分公司名 from monthxd; 将所有分公司名拼接起来。 如果有重复值则使用distinct进行约束: select group_concat(distinct 分公司) 分公司名 from orderq;
阅读全文
摘要:python 爬虫和解析 库的安装:pip install requests; pip install beautifulsoup4 requests 的几个常用方法: requests.request() #以下各方法的基础 requests.get(url,params=None,**kwarg
阅读全文
摘要:python 的re库为: raw string 类型(原生字符串类型,即不含转义字符) 在字符串前面加 r'...'就行了 Re库主要功能函数 re.rearch(pattern,string,flags=0) 在一个字符串中搜索匹配表达式第一个位置,返回match对象 *pattern:正则表达
阅读全文
摘要:^[A-Za-z]+$ 由26个字母组成的字符串 ^[A-Za-z0-9]+$ 由26个字母和数字组成的字符串 ^-?\d+$ 整数形式的字符串 ^[0-9]*[1-9][0-9]*$ 正整数形式的字符串 [1-9]\d{5} 中国境内邮政编码,6位 [\u4e00-\u9fa5] 匹配中文字符 \
阅读全文
摘要:1 import requests 2 from bs4 import BeautifulSoup 3 import bs4 4 def gethtmltext(url): #获取html内容,利用try和except框架可以抛出异常 5 try: 6 r = requests.get(url,ti
阅读全文
摘要:查询示例:
阅读全文
摘要:1 #!/usr/bin/env python 2 # coding: utf-8 3 4 def concat_file(a,b): 5 #如何批量读取并快速合并文件夹中的excel文件 6 import pandas as pd 7 import numpy as np 8 import glob,os 9 path1=a 10 file=glob.glob(os.path.join(path
阅读全文
摘要:1 #!/usr/bin/env python 2 # coding: utf-8 3 4 import numpy as np 5 import pandas as pd 6 7 path='C:/Users/Administrator/Downloads/notebook/order.xls' 8 path1='c:/users/administrator/downloads/notebook
阅读全文
摘要:1,df_order5=df_order4.drop_duplicates(['订单来源'],keep='first') #去除重复数据 指定某一列去重 2,#在底部添加合计并汇总数据 添加行记录用到 loc['xx']= df_order有销触点=df_order5.groupby(['分公司',
阅读全文
摘要:step 1: cd 到python3.7安装根目录下的Scripts文件夹 如:cd C:\Program Files\Python37\Scripts 可以通过查找pip.exe来确定正确的文件夹路径 step 2: 安装所需文件的开发版 安装命令:pip install https://git
阅读全文
摘要:1,def mysql(sql): cursor.execute(sql) jieguo=cursor.fetchall cols=cursor.description col=[] for v in cols: col.append(v[0]) dfsql=pd.DataFrame(jieguo,
阅读全文
摘要:1,plt.style.use('ggplot') #使用R语言的图像配色方案 2,for a,b in zip(x,y): plt.text(a,b+1,'%.0f'%b,ha='center',va='bottom',fontsize=12) #为柱状图和折线图添加数据标签,x为array类型,
阅读全文

浙公网安备 33010602011771号