Skip to content

Commit 2e7f349

Browse files
committed
Use fenced code blocks in tbl preview docstring
1 parent 5320ddd commit 2e7f349

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

great_docs/_tbl_display.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ def enable_tbl_preview(**kwargs: Any) -> None:
2020
--------
2121
In a notebook or `.qmd` file:
2222
23-
.. code-block:: python
23+
```python
24+
import great_docs as gd
25+
gd.enable_tbl_preview(n_head=8, n_tail=3)
26+
```
2427
25-
import great_docs as gd
26-
gd.enable_tbl_preview(n_head=8, n_tail=3)
28+
Now any DataFrame displayed will use `tbl_preview()` automatically:
2729
28-
# Now any DataFrame displayed will use tbl_preview() automatically:
29-
import pandas as pd
30-
pd.read_csv("data.csv") # → rendered as a preview table
30+
```python
31+
import pandas as pd
32+
pd.read_csv("data.csv") # rendered as a preview table
33+
```
3134
"""
3235
try:
3336
ip = _get_ipython()

0 commit comments

Comments
 (0)