[Feature Request] New Table component
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 202
- Avg merge
- 4h 36m
- Merged PRs (30d)
- 3
Description
I think sl.Table would be great, especially if It could come from a pandas dataframe (or list of dictionaries etc).
Currently, I need to do this to get a decent centered table
html = (f"""
<table class='center' height="50%" width="100%" align=center cellpadding ="25">
<tr>
<th><h2>Question</h2></th>
<th><h2>Answer</h2></th>
</tr>
{get_table_rows()}
</table>
"""
)
and then a get_table_rows helper function thats like this
def get_table_rows() -> str:
table_rows = ""
for question in State.history.value:
table_rows += f"<tr>\n\t<td>{question.q}</td>\n\t<td>{question.a}</td>\n</tr>"
return table_rows
It would be awesome if I could have a simple styled centered table from an object
sl.Table(my_data)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue proposes a new sl.Table component, accepting a pandas dataframe or list of dictionaries and rendering a centered styled table. No files, tests, or entry points are named, so first locate the existing Solara component API and rendering tests. Done should include a defined input API and coverage for the requested table output and styling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pandas, python
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100