import numpy as npNumPy -> “Numerical Python extensions”.
NumPy offers:
array([1. , 1.44444444, 1.88888889, 2.33333333, 2.77777778, 3.22222222, 3.66666667, 4.11111111, 4.55555556, 5. ])
TypeError: can only concatenate list (not "int") to list
Detailed traceback:
File "<string>", line 1, in <module>
array([ 98, 87, 103, 92, 67, 107, 78, 104, 85, 105])
array([False, False, True, False, False, True, False, True, False, True])
array([ 98, 87, 103, 92, 67, 107, 78, 104, 85, 105])
| name | mfr | type | calories | ... | shelf | weight | cups | rating | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 100% Bran | N | Cold | 70 | ... | 3 | 1.0 | 0.33 | 68.402973 |
| 1 | 100% Natural Bran | Q | Cold | 120 | ... | 3 | 1.0 | 1.00 | 33.983679 |
| 2 | All-Bran | K | Cold | 70 | ... | 3 | 1.0 | 0.33 | 59.425505 |
| 3 | All-Bran with Extra Fiber | K | Cold | 50 | ... | 3 | 1.0 | 0.50 | 93.704912 |
| 4 | Almond Delight | R | Cold | 110 | ... | 3 | 1.0 | 0.75 | 34.384843 |
5 rows × 16 columns
array([ 70, 120, 70, 50, 110, 110, 110, 130, 90, 90, 120, 110, 120, 110, 110, 110, 100, 110, 110, 110, 100, 110, 100, 100, 110, 110, 100, 120, 120, 110, 100, 110, 100, 110, 120, 120, 110, 110, 110, 140, 110, 100, 110, 100, 150, 150, 160, 100, 120, 140, 90, 130, 120, 100, 50, 50, 100, 100, 120, 100, 90, 110, 110, 80, 90, 90, 110, 110, 90, 110, 140, 100, 110, 110, 100, 100, 110])



The full list of mathematical functions are available at this NumPy website.