-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea75721
commit 5e53624
Showing
16 changed files
with
4,558 additions
and
13 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: Test of row_content | ||
--- | ||
|
||
```{python} | ||
import pandas as pd | ||
import panel as pn | ||
# from panel.widgets import DataFrame | ||
pn.extension('tabulator') | ||
# Sample DataFrame | ||
data = {'name': ['Alice', 'Bob', 'Charlie'], | ||
'Value1': [10, 20, 30], | ||
'Value2': [3, 2, 5], | ||
} | ||
df = pd.DataFrame(data) | ||
def content_fn( row ): | ||
return pn.pane.Markdown( | ||
f'# Row contents\n name: {row["name"]}', | ||
sizing_mode='stretch_width' | ||
) | ||
sample_table = pn.widgets.Tabulator( | ||
df, height=350, | ||
layout='fit_columns', | ||
sizing_mode='stretch_width', | ||
row_content=content_fn, | ||
embed_content=True, | ||
expanded = [] | ||
) | ||
sample_table | ||
``` |
Oops, something went wrong.