更正了文档中的数学公式
|
@ -197,9 +197,7 @@ Notebook是基于网页的用于交互计算的应用程序,可以用于代码
|
|||
- **分位数**:将一个随机变量的概率分布范围分为几个具有相同概率的连续区间,比如最常见的中位数(二分位数,median),就是将数据集划分为数量相等的上下两个部分。除此之外,常见的分位数还有四分位数(quartile)、百分位数(percentile)等。
|
||||
|
||||
- 中位数:
|
||||
$
|
||||
{Q}_{\frac {1}{2}}(x)={\begin{cases}x'_{\frac{n+1}{2}},&n是奇数\\{\frac {1}{2}}(x'_{\frac{n}{2}}+x'_{{\frac{n}{2}}+1}),&n是偶数\end{cases}}
|
||||
$
|
||||
${Q}_{\frac {1}{2}}(x)={\begin{cases}x'_{\frac{n+1}{2}},&{n是奇数}\\{\frac {1}{2}}(x'_{\frac{n}{2}}+x'_{{\frac{n}{2}}+1}),&{n是偶数}\end{cases}}$
|
||||
|
||||
- 四分位数:
|
||||
|
||||
|
|
|
@ -7,12 +7,24 @@ Numpy最为核心的数据类型是`ndarray`,使用`ndarray`可以处理一维
|
|||
### 创建数组对象
|
||||
|
||||
1. 一维数组
|
||||
- 方法一:使用array函数,通过list创建数组对象
|
||||
- 方法二:使用arange函数,指定取值范围创建数组对象
|
||||
- 方法三:使用linspace函数,用指定范围均匀间隔的数字创建数组对象
|
||||
- 方法四:使用numpy.random模块的函数生成随机数创建数组对象
|
||||
2. 二维数组
|
||||
3. 多维数组
|
||||
- 方法一:使用array函数,通过嵌套的list创建数组对象
|
||||
- 方法二:使用zeros、ones、full函数指定数组的形状创建数组对象
|
||||
- 方法三:使用eye函数创建单位矩阵
|
||||
- 方法四:通过reshape将一维数组变成二维数组
|
||||
- 方法五:通过numpy.random模块的函数生成随机数创建数组对象
|
||||
3. 多维数组:跟上面的情况相似,可以通过下面的例子进行了解。
|
||||
|
||||
### 数组对象基本属性
|
||||
|
||||
|
||||
1. size属性:元素个数
|
||||
2. shape属性:数组的形状
|
||||
3. dtype属性:元素的数据类型
|
||||
4. ndim属性:数组的维度
|
||||
|
||||
### 数组对象常用方法
|
||||
|
||||
|
|
|
@ -24,6 +24,12 @@ from matplotlib import pyplot as plt
|
|||
%matplotlib inline
|
||||
```
|
||||
|
||||
通过下面的魔法指令,可以生成矢量图(SVG)。
|
||||
|
||||
```Python
|
||||
%config InlineBackend.figure_format='svg'
|
||||
```
|
||||
|
||||
#### 绘图的流程
|
||||
|
||||
1. 创建画布
|
||||
|
|
|
@ -1,2 +1,14 @@
|
|||
## 数据分析项目实战
|
||||
|
||||
### 2020年北京积分落户分析
|
||||
|
||||
|
||||
|
||||
### 某招聘网站招聘数据分析
|
||||
|
||||
|
||||
|
||||
### 某电商网站订单数据分析
|
||||
|
||||
|
||||
|
||||
|
|
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 127 KiB |
Before Width: | Height: | Size: 298 KiB After Width: | Height: | Size: 214 KiB |
Before Width: | Height: | Size: 335 KiB After Width: | Height: | Size: 236 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 386 KiB After Width: | Height: | Size: 277 KiB |
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 247 KiB After Width: | Height: | Size: 180 KiB |
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 199 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 308 KiB After Width: | Height: | Size: 217 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 230 KiB After Width: | Height: | Size: 164 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 379 KiB After Width: | Height: | Size: 270 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 224 KiB After Width: | Height: | Size: 113 KiB |
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 212 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 268 KiB After Width: | Height: | Size: 204 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 366 KiB After Width: | Height: | Size: 238 KiB |
Before Width: | Height: | Size: 374 KiB After Width: | Height: | Size: 240 KiB |