| 0 | Gjon |
| 1 | Lira |
|  The Series has 2 values | ||
|  The index starts at 0 | ||
|  The Series has 3 values | ||
|  The value at 1 is Gjon |
| 0 | 20 |
| 1 | 8 |
| 2 | 12 |
| 3 | 4 |
| 4 | 16 |
|  The min is 8 | ||
|  The max is 20 | ||
|  The median is 12 | ||
|  There are 4 values |
These are harvest kg. Create a Series from [12, 3, 8, 6] with index ['rye', 'oat', 'bar', 'fig'] and assign it to s.
Take the max of s, assign the result to high, and print high.
Create a Series from [41, 50, 62] and assign it to s.
Keep the values of s that are greater than 50, assign them to high, and print high.
Write a function named rain_mm that takes a list of millimetres and returns a Series of the amounts greater than 0.
>>> rain_mm([6, 0, 2]) 0 6 1 2 dtype: int64
Call rain_mm with [9, 0, 1, 4], assign the result to rain, and print rain.
s is a Series of tree names.
Count the distinct values of s and assign the result to n.
Print n.
Create a Series of 4 numbers with index ['Miri', 'Vesa', 'Dori', 'Klea'], assign it to s, and print s.
Write a function named low_mask that takes a Series of weights s and a number n and returns the mask of weights less than n.
>>> s = pd.Series([9, 20, 4]) >>> low_mask(s, 10) 0 True 1 False 2 True dtype: bool
Write a function named light_total that takes a Series of weights s and a number n and returns the total of the weights less than n. light_total must use low_mask.
>>> s = pd.Series([7, 15, 2]) >>> light_total(s, 10) 9
Write a function named depth_if_deep that takes a Series of depths s, a label label, and a number n, and returns the depth with that label if it is greater than n, or 0 if not.
>>> s = pd.Series([8, 1], index=["W1", "W2"]) >>> depth_if_deep(s, "W1", 5) 8
Call depth_if_deep with pd.Series([6, 2], index=['A', 'B']), B, and 1, assign the result to got, and print got.
Create a Series of 2 strings with index ['Fier', 'Vlora'], assign it to s, and print s.