```python
import numpy as np                     # Load the library

a = np.linspace(-np.pi, np.pi, 100)    # Create even grid from -π to π
b = np.cos(a)                          # Apply cosine to each element of a
c = np.sin(a)                          # Apply sin to each element of a
```


```python
b @ c
```




    3.3306690738754696e-16




```python
from scipy.stats import norm
from scipy.integrate import quad

ϕ = norm()
value, error = quad(ϕ.pdf, -2, 2)  # Integrate using Gaussian quadrature
value
```




    0.9544997361036417




```python
from sympy import Symbol

x, y = Symbol('x'), Symbol('y')  # Treat 'x' and 'y' as algebraic symbols
x + x + x + y
```




$\displaystyle 3 x + y$




```python
expression = (x + y)**2
expression.expand()
```




$\displaystyle x^{2} + 2 x y + y^{2}$




```python
from sympy import solve

solve(x**2 + x + 2)
```




    [-1/2 - sqrt(7)*I/2, -1/2 + sqrt(7)*I/2]




```python
from sympy import limit, sin, diff

limit(1 / x, x, 0)
```




$\displaystyle \infty$




```python
limit(sin(x) / x, x, 0)
```




$\displaystyle 1$




```python
diff(sin(x), x)
```




$\displaystyle \cos{\left(x \right)}$




```python
import pandas as pd
np.random.seed(1234)

data = np.random.randn(5, 2)  # 5x2 matrix of N(0, 1) random draws
dates = pd.date_range('28/12/2010', periods=5)

df = pd.DataFrame(data, columns=('price', 'weight'), index=dates)
print(df)
```

                   price    weight
    2010-12-28  0.471435 -1.190976
    2010-12-29  1.432707 -0.312652
    2010-12-30 -0.720589  0.887163
    2010-12-31  0.859588 -0.636524
    2011-01-01  0.015696 -2.242685



```python
df.mean()
```




    price     0.411768
    weight   -0.699135
    dtype: float64



a59e1b578ecb89c983dd541fddf22760db028530
ipynb
Jupyter Notebook
mini_book/_build/.jupyter_cache/executed/28957355068643b77064203b6d0079ba/base.ipynb
rebeccajohnson88/qss20_win22_coursepage
cbe96d3e1e04d6e5d3de5e55acf8d65207cea0a0
CC0-1.0
2021-04-01T18:42:36.000Z
2021-04-01T18:42:36.000Z
mini_book/_build/.jupyter_cache/executed/28957355068643b77064203b6d0079ba/base.ipynb
rebeccajohnson88/qss20
f936e77660e551bb10a82abb96a36369ccbf3d18
CC0-1.0
2021-02-14T22:36:59.000Z
2021-02-24T23:33:24.000Z
mini_book/_build/.jupyter_cache/executed/28957355068643b77064203b6d0079ba/base.ipynb
rebeccajohnson88/qss20_win22_coursepage
cbe96d3e1e04d6e5d3de5e55acf8d65207cea0a0
CC0-1.0
Qwen/Qwen-72B
1. YES
2. YES