# redivis.current\_notebook

### **redivis.**<mark style="color:purple;">**current\_notebook**</mark>**()** → [Notebook](https://docs.redivis.com/api/client-libraries/redivis-python/reference/notebook)

Returns a reference to the current notebook. Can only be called from within a running Redivis notebook. The current use case for this method is to generate an output table from the notebook (see example).

### **Returns:**

[**Notebook**](https://docs.redivis.com/api/client-libraries/redivis-python/reference/notebook)

{% hint style="success" %}
**See also**

* [Notebook.create\_output\_table()](https://docs.redivis.com/api/client-libraries/redivis-python/reference/notebook/notebook.create_output_table)
  {% endhint %}

### Examples

```python
df = get_dataframe_somehow()

notebook = redivis.current_notebook()

# Create an output table on the current notebook
# Optional parameter, append (default False), determines whether the output appends to
#  or replaces the output table.
notebook.create_output_table(df, append=False) 
```
