1. 统计的对象words.txt,每个单词占一行(从简考虑了~) zjd@ubuntu:~/test$ cat word.txt used this count mysql count this used mysql linux this redis apple android redis apple 2. 统计每个单词的频率 方法1: zjd@ubuntu:~/test$ cat word.txt |awk '{a[$0]++}END{for(i in a) print i"="
认识 jupyter地址: https://nbviewer.jupyter.org/github/chenjieyouge/jupyter_share/blob/master/share/pandas-%20%E6%8F%8F%E8%BF%B0%E6%80%A7%E7%BB%9F%E8%AE%A1.ipynb import numpy as np import pandas as pd pandas objects are equipped(配备的) with a set of common
按年汇总,统计: select sum(mymoney) as totalmoney, count(*) as sheets from mytable group by date_format(col, '%Y'); 按月汇总,统计: select sum(mymoney) as totalmoney, count(*) as sheets from mytable group by date_format(col, '%Y-%m'); 按季度汇总,统计: select sum(mymone
在mysql数据库中,常常会遇到统计当天的内容.例如,在user表中,日期字段为:log_time统计当天 sql语句为: select * from user where date(log_time) = curdate(); curdate()表示当天日期统计前一天 如果表示前一天的数据,则不能使用curdate()-1,因为当日期为月初时,curdate()-1 日期就不是上一个月的月末日期. 例如:今天是6月1日,理论上curdate()-1为5月31日,但是curdate()-1得到不