- 博客(79)
- 收藏
- 关注
原创 MySQL Lesson4
1:关于查询结果集的去重(distinct)select distinct job from emp;**distinct只能出现在所有字段的最前面。所表示的含有是所有的结果联合起来去重。select distinct deptno,job from emp order by deptno;select count(distinct job)from emp;2:连接查询#什么是连接查询?实际开发中,大部分不是从单表中查询数据,一般是多张表联合查询,然后取出最终
2023-02-27 10:15:25
283
原创 mysql Lesson2
条件查询续集...................1:and 和or的用法select ename,job from emp where job='clerk' or job='salesman'#and 有优先级,需要打括号,当与or在一起时select ename,sal,deptno from emp where sal>1000 and( deptno=20 or deptno=30);2:#in 等同于or(字符或者数字都是表示一个值,而不是区间)select
2023-02-24 08:57:27
72
原创 数据的分组聚合
1:分组 t.groupby#coding:utf-8import pandas as pdimport numpy as npfile_path='./starbucks_store_worldwide.csv'df=pd.read_csv(file_path)#print(df.head(1))#print(df.info())grouped=df.groupby(by='Country')print(grouped)#DataFrameGroupBy#可以遍历,也可以使用聚
2023-02-14 16:34:59
650
原创 数据分析课程笔记20230209
1:numpy中的布尔索引t3=np.arange(24).reshape(4,6)print(t3<10)#布尔值使用t3[t3<10]=0#print(t3)#布尔值替换2;numpy的三元运算符(把小于10的值替换为0,其他替换为10t3=np.arange(24).reshape(4,6)t4=np.where(t3<10,0,10)print(t4)3:裁剪,numpy中的clipt3=np.arange(24).reshape(4,6)t4
2023-02-09 21:08:18
50
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人