r"""Determine those values of the dataframe that are below the moving average. Parameters ---------- f : pandas.DataFrame Dataframe containing the column ``c``. c : str Name of the column in the dataframe ``f``. p : int The period of the moving averag
(f, c, p = 50)
| 121 | # |
| 122 | |
| 123 | def belowma(f, c, p = 50): |
| 124 | r"""Determine those values of the dataframe that are below the |
| 125 | moving average. |
| 126 | |
| 127 | Parameters |
| 128 | ---------- |
| 129 | f : pandas.DataFrame |
| 130 | Dataframe containing the column ``c``. |
| 131 | c : str |
| 132 | Name of the column in the dataframe ``f``. |
| 133 | p : int |
| 134 | The period of the moving average. |
| 135 | |
| 136 | Returns |
| 137 | ------- |
| 138 | new_column : pandas.Series (bool) |
| 139 | The array containing the new feature. |
| 140 | |
| 141 | """ |
| 142 | new_column = f[c] < ma(f, c, p) |
| 143 | return new_column |
| 144 | |
| 145 | |
| 146 | # |