()
| 104 | in_notebook = _in_notebook() |
| 105 | |
| 106 | def stream_updates(): |
| 107 | df = pd.DataFrame.from_dict(integrated, orient="index", columns=col_names) |
| 108 | if sorting_col: |
| 109 | df = df.sort_values(sorting_col) |
| 110 | else: |
| 111 | df = df.sort_index() |
| 112 | df = df.reset_index(drop=True) |
| 113 | |
| 114 | source.stream( |
| 115 | df.to_dict("list"), rollover=len(df) # type:ignore[arg-type] |
| 116 | ) |
| 117 | |
| 118 | if in_notebook: |
| 119 | pn.io.push_notebook(viz) |
| 120 | |
| 121 | def _update(key, row, time, is_addition): |
| 122 | if is_addition: |
no test coverage detected