Jupyter Notebook 示例¶
本页面由mkdocs-cust自动转换。
Makrdown单元格¶
文本¶
链接: yangzhang's Site
斜体, 粗体
列表¶
- 无序列表1
- 无序列表2
- 无序列表3
- 有序列表1
- 有序列表2
- 有序列表3
表格¶
Syntax | Description |
---|---|
Header | Title |
Paragraph | Text |
这里是:
引用内容
代码块¶
SELECT * FROM ta WHERE score > 1
数学¶
$$ \sin^2x + \cos^2x = 1 $$
其中$\sin x \in [-1,1]$
代码单元格¶
输入输出¶
In [2]:
print("Hello, world!")
Hello, world!
画图¶
In [2]:
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 10, 100)
y = np.sin(x)
y2 = np.cos(x)
plt.plot(x, y, label="$\sin(x) \delta$")
plt.plot(x, y2, label="cos(x)")
plt.legend()
plt.title("Sine and Cosine Functions")
Out[2]:
Text(0.5, 1.0, 'Sine and Cosine Functions')
表格¶
In [6]:
import pandas as pd
df = pd.DataFrame({'x': x, 'y': y, 'y2': y2})
df
Out[6]:
x | y | y2 | |
---|---|---|---|
0 | 0.00000 | 0.000000 | 1.000000 |
1 | 0.10101 | 0.100838 | 0.994903 |
2 | 0.20202 | 0.200649 | 0.979663 |
3 | 0.30303 | 0.298414 | 0.954437 |
4 | 0.40404 | 0.393137 | 0.919480 |
... | ... | ... | ... |
95 | 9.59596 | -0.170347 | -0.985384 |
96 | 9.69697 | -0.268843 | -0.963184 |
97 | 9.79798 | -0.364599 | -0.931165 |
98 | 9.89899 | -0.456637 | -0.889653 |
99 | 10.00000 | -0.544021 | -0.839072 |
100 rows × 3 columns
In [5]:
df.mean()
Out[5]:
x 5.000000 y 0.179193 y2 -0.053008 dtype: float64
In [ ]:
最后更新: 2025-04-14 23:26:29
创建日期: 2025-04-14 23:26:29
创建日期: 2025-04-14 23:26:29