(attr, old, new)
| 32 | plot.line('time', 'temperature', source=source) |
| 33 | |
| 34 | def callback(attr, old, new): |
| 35 | if new == 0: |
| 36 | data = df |
| 37 | else: |
| 38 | data = df.rolling('{0}D'.format(new)).mean() |
| 39 | source.data = ColumnDataSource.from_df(data) |
| 40 | |
| 41 | slider = Slider(start=0, end=30, value=0, step=1, title="Smoothing by N Days") |
| 42 | slider.on_change('value', callback) |
no outgoing calls
no test coverage detected
searching dependent graphs…