自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(67)
  • 收藏
  • 关注

原创 SQL 笔记

SQL 案例Self Join查找所有比Allen 工资高的员工table: employeeSELECT a.* ---select all columns in table a FROM employee AS a, employee AS b ----self join WHERE a.salary >b.salaryAND b.name ='ALLEN';

2020-06-29 20:17:50 159

原创 常见报错

1.赋值的语句少个右括号pay =int(input('how much is your pay?') #最右边少了右括号if pay>=500: print('your pay is high') if pay>=500: ^Sy...

2019-05-09 18:21:23 154

原创 SQL Correlated Subquery

SQL Correlated SubqueryWHEN to use :1.when asking negative data questionshttps://learnsql.com/blog/correlated-sql-subquery-5-minutes/2.https://www.w3resource.com/sql-exercises/subqueries/sql-subqueries-inventory-exercise-11.php

2020-07-10 03:23:26 357

原创 SQL exists,not exists,IN

SQL exists,not exists,INhttps://www.youtube.com/watch?v=zfgJ3ZmAgNw&t=20shttps://www.youtube.com/watch?v=GnYyX40Oclghttps://www.youtube.com/watch?v=EfkvHDsLwi0https://www.youtube.com/watch?v=EfkvHDsLwi0https://blog.csdn.net/xiangqian9/article/deta

2020-07-10 03:15:40 285

原创 SQL 合并两个表的数据

SQL 合并两个表的数据1.通过共同的field valuedisplay all the customers with orders issued on date 17th August, 2012:SELECT c.customer_name, o.*FROM orders AS o,customer AS c # combine two tables togetherWHERE o.customer_id = c.customer_id

2020-07-09 22:41:50 2701

原创 SQL Subquery

SQL Subquerycan be used inside of WHERE, SELECT,FROM1.when subquery is used inside WHERE, it returns a column2.when subquery is used inside FROM, it returns a table3.when subquery is used inside SELECT, it returns a single value

2020-07-09 22:18:28 267

原创 SQL Data Camp

SQL Data CampSelf Jointable:populationscalculate the percentage increase in population from 2010 to 2015 for each country codeSELECT p1.country_code, p1.size AS size2010, p2.size AS size2015, -- 1. calculate growth_perc (

2020-07-06 15:52:44 249

原创 SQL 窗口函数:ROWS与RANGE

SQL Window Funcionshttps://www.youtube.com/watch?v=H6OTMoXjNiMhttps://www.youtube.com/watch?v=TzsrO4zTQj8分析函数的语法结构一般是:分析函数名(参数) OVER (PARTITION BY子句 ORDER BY子句 ROWS/RANGE子句)。即由以下三部分组成:分析函数名:如sum、max、min、count、avg等聚集函数以及lead、lag行比较函数等;over: 关键字,表示前面的

2020-07-02 05:12:42 5763

原创 SQL Select Into

SQL Select Intohttps://www.youtube.com/watch?v=7od9V6EN6pkhttps://www.youtube.com/watch?v=s1Clw23uMrshttps://www.youtube.com/watch?v=YpLfUlihd5U

2020-06-25 04:09:59 130

原创 SQL Self Join

Self Joinhttps://www.youtube.com/watch?v=W0p8KP0o8g4https://www.youtube.com/watch?v=G4vO83UUzek

2020-06-25 02:55:47 353

原创 SQL Joins

JOININNER JOIN and LEFT JOINhttps://www.youtube.com/watch?v=Q8yzRCz3Otw&list=PLFfxQqRQ0MuTLkcWBsLXVDXEyKSh7wnOJ&index=1https://www.youtube.com/watch?v=7yvB-tTHRfQ&list=PLFfxQqRQ0MuTLkcWBsLXVDXEyKSh7wnOJ&index=3&t=0shttps://www.

2020-06-25 02:08:59 136

原创 SQL ON, WHERE, HAVING 子句的不同

ON 子句与 WHERE 子句的不同

2020-06-25 02:07:51 204

原创 Python的迭代器(iterator)和生成器(generator)*************

Python的迭代器(iterator)和生成器(generator)https://blog.csdn.net/qq_28485501/article/details/84638377?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task...

2020-03-15 20:58:59 174

原创 怎样让CSDN代码有颜色

1.其实只需要在代码块的三个```的后面加上你放上去的代码块的类型就可以了,如下图,我在这里代码类型属于html,所以加上html就可以了a={'brand': 'Ford', 'model': 'Mustang', 'year': 1964}b= a.pop('year')print(b)print(a)2.在设置中把’代码片样式改成‘Dracula’...

2020-03-15 20:58:43 475

原创 Python number相关函数的应用

1.abs(): 返回数字的绝对值(absolute number),如abs(-10) 返回 10 print(abs(-10)) <<<<102.pow(x,y):这个是表示x的y次幂(次方)。 print(pow(2,4)) ...

2020-03-13 05:58:48 284

原创 Python 字符串应用 2: replace()

replace() 方法用于把字符串中指定的旧子字符串替换成指定的新子字符串a='I is born in 1991, I is born in China'print(a.replace('is','was'))<<<<I was born in 1991, I was born in China...

2020-03-13 02:29:12 261

原创 Python 字符串应用1 :大小写的转换 upper(), lower(),capitalize(),title(), isupper()

字符串.upper():字符串中字母由小写变为大写字符串.lower():字符串中字母由大写变为小写字符串.capitalize():字符串中字母首字母大写其余小写字符串.title():字符串中字母每个单词的首字母大写其余小写 :Examples:film = 'game of thrones'print(film.upper())<<<<GAME...

2020-03-13 01:46:37 569

原创 Pivot Table

Pivot Tablesource data checklist(条件):-no blank columns-no black row-no merged cells-source data need to have headerfieldscreate Pivot Tablecreate Pivot Chartcreate DashboardHow to add a sear...

2019-10-04 04:42:38 1623

原创 Count(), Rank(),Percentile.inc() ,Quartile.inc()

Count()COUNT(value1, [value2], …)count the number of cells contain certain numbers(not text)COUNTA()COUNTA(value1, [value2], …)used to count text(not number)counts the number of cells that are n...

2019-10-02 04:09:37 1241

原创 Logical functions,IF, AND, OR

Logical FunctionsIFANDORIF 常和and,or连用e.g IF(AND(A2<A3,A2<100),A2,“The value is out of range”)

2019-10-01 23:47:19 200

原创 Vlookup & Index & Match

语法规则参数说明Lookup_value为需要在数据表第一列中进行查找的数值。Lookup_value 可以为数值、引用或文本字符串。Table_array为需要在其中查找数据的数据表。使用对区域或区域名称的引用。col_index_num为table_array 中查找数据的数据列序号。col_index_num 为 1 时,返回 table_array 第一列的数值,col_inde...

2019-10-01 23:26:34 279

原创 input date and time

input date and timeshortcut:date: ctrl+; (semicolon)time: ctrl+shift+: (colon)函数:today() 出现当前日期now(), 出现当前日期和时间**date()**已有年月日数据,用此函数combineDATEDIF(start_date,end_date,unit) : Calculates the n...

2019-10-01 21:06:34 367

原创 Combine text from two or more cells into one cell

Combine text from two or more cells into one cellCombine data with the Ampersand symbol (&)Select the cell where you want to put the combined data.Type = and select the first cell you want to c...

2019-10-01 19:51:01 231

原创 Split data to different cells

Split data to different cells一.用函数LEFT(text, [num_chars])MID(text, start_num, num_chars)RIGHT(text,[num_chars])Text: The text string containing the characters you want to extract.Num_chars: Opti...

2019-10-01 19:50:34 153

原创 大小写转化 upper(), lower(),proper()

大小写转化 upper(), lower(),proper()upper() 全都变成大写lower()全都变成小写proper()首字母变成大写

2019-10-01 19:49:22 466

原创 PPT 转化成单独的image(GIF)

PPT 转化成单独的image(GIF)点击另存为,选择‘ GIF Graphics Interchange Format’

2019-07-17 00:12:54 447

原创 PPT 转化成PDF 或 不可编辑Powerpoint show

点击另存为,选择PDF 或者 Powerpoint show共享给别人的时候对方不可编辑

2019-07-16 23:52:54 1771

原创 PPT 添加日期/页数/页眉/页脚

进入打印

2019-07-16 23:22:06 497

原创 怎样把excel中的图表插入PPT并且可以在PPT中编辑图表

1、以excel2010版本为例,如下图所示,要把该图表复制到PPT;2、点击excel的图表点复制,然后在PPT里面点击鼠标右键,粘贴选项选择保留源格式和嵌入工作簿;3、点击保留源格式和嵌入工作簿后就会得到如下图所示的图表,根据需要调整位置和大小即可;4、选中该图表,点击鼠标右键,找到“编辑数据”并点击;5、就会打开该图表的excel格式了,并且里面的数据可直接编辑。...

2019-07-16 22:32:41 14599

原创 PowerPoint Shortcuts+Functions

1.ctrl+M create new slide2,Double click ‘File tabs’ to hide/show ribbons

2019-07-16 22:32:23 252

转载 Python 写邮件之smtplib模块和email模块

smtplib模块在写脚本时,放到后台运行,想知道执行情况,会通过邮件、SMS(短信)、飞信、微信等方式通知管理员,用的最多的是邮件。在linux下,Shell脚本发送邮件告警是件很简单的事,有现成的邮件服务软件或者调用运营商邮箱服务器。对于Python来说,需要编写脚本调用邮件服务器来发送邮件,使用的协议是SMTP。接收邮件,使用的协议是POP3和IMAP。我想有必要说明下 ,POP3和IM...

2019-07-11 21:35:48 865

原创 Python Print打印计时器功能

1.倒计时我们仔细看看print的参数:print(value,sep=’ ‘,end=’\n’,file=sys.stdout,flush=False)这个value是我们要打印的字符串,sep则是value之间的间隔(我们可以print(“Hello”,“Python”)看到中间确实有一个空格间隔开了)end是打印完成之后要打印的事,print默认在结束的时候打印一个\n,即换行(我们想...

2019-06-13 21:32:33 8107 5

原创 Python 转义字符\r,\n,\t,\\,\b

\r将光标移到一行的开始,覆盖\r是将光标移到一行的开始,所以\r之后的内容会覆盖掉上次打印的内容print('你好吗?\r朋友')<<朋友吗?"\n"换行打印结果分列在两行print('i love you \ni love you too')<<i love youi love you too"\t"制表符打印结果中间隔了一个制表符print...

2019-06-13 20:24:53 19971 1

原创 python:打印一个动态进度条

以下代码完成了一个动态进度条的打印。import timefor i in range(11): time.sleep(0.5) print('\r当前进度:{0}{1}%'.format('▉'*i,(i*10)), end='')print('加载完成!')\r是将光标移到一行的开始,所以\r之后的内容会覆盖掉上次打印的内容,形成动态打印。效果图:...

2019-06-13 20:04:26 2228 2

原创 python中的end=''

为末尾end传递一个空字符串,这样print函数不会在字符串末尾添加一个换行符,而是添加一个空字符串print默认是打印一行,结尾加换行。end=’ '意思是末尾不换行,加空格。list = [1,2,3]for i in list: print(i,end='') <<123list = [1,2,3]for i in list: prin...

2019-06-13 18:41:50 4596 2

原创 python中range函数怎么倒着取值

range(10,0,-1)意思是从列表的下标为10的元素开始,倒序取到下标为0的元素(但是不包括下标为0元素),也就是说list[10]-list[1],转化成range就是相当于range(1,11)的倒序,最后得到的结果是[10,9,8,7,6,5,4,3,2,1]...

2019-06-13 18:39:27 5439

原创 Python之time模块的时间戳、时间字符串格式化

关于时间戳的几个概念时间戳,根据1970年1月1日00:00:00开始按秒计算的偏移量。时间元组(struct_time),包含9个元素。time.struct_time(tm_year=2017, tm_mon=10, tm_mday=1, tm_hour=14, tm_min=21, tm_sec=57, tm_wday=6, tm_yday=274, tm_isdst=0)时间格式字...

2019-06-13 18:16:38 1624

原创 Python,csv.reader()

1.如何读取csv文件csv.reader()读取结果是列表e.gtest.csv是一个excel文件,内容是数字import csvwith open("test.csv",newline = '') as f: reader = csv.reader(f) #使用csv的reader()方法,创建一个reader对象 for row in reader: ...

2019-06-13 18:03:09 47363

原创 Python 模块datetime

模块datetime

2019-06-13 05:10:26 111

原创 python中的format()函数

format格式化函数基本语法感觉和占位符一样,通过 {} 和 : 来替代以前的%。1.使用位置参数位置参数不受约束,索引从0开始(也可以不写)print ('{0},{1}'.format('chuhao',20)) print ('{},{}'.format('chuhao',20)) print ('{1},{0},{1}'.format('chuhao',20))输出...

2019-06-13 05:06:22 2516

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除