Skip to content

Update docs #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="/assets/pandas-render.png" alt="pandas-render" height=130>
<img src="https://raw.githubusercontent.com/nok/pandas-render/refs/heads/main/assets/pandas-render.png" alt="pandas-render" height=130>
</p>

<h1 align="center">pandas-render</h1>
Expand All @@ -10,19 +10,18 @@

![GitHub Repo stars](https://img.shields.io/github/stars/nok/pandas-render)
[![Ko-fi](https://img.shields.io/badge/Ko--fi-FF5E5B?logo=ko-fi&logoColor=white)](https://ko-fi.com/nok)
[![GitHub License](https://img.shields.io/github/license/nok/sklearn-porter)](LICENSE)

</div>


## Installation

```bash
pip install pandas-render[pandas]
pip install "pandas-render[pandas]"
```

```bash
pip install pandas-render[polars]
pip install "pandas-render[polars]"
```


Expand Down Expand Up @@ -65,6 +64,11 @@ List of all notebooks with examples:
- [Components](examples/02_components.ipynb)


## Support

Do you like this project? Fuel it with a ☕ coffee on [Ko-fi](https://ko-fi.com/nok). Every little bit helps and means a lot!


## Contributing

We encourage you to contribute to this project! Please check out the [contributing guidelines](CONTRIBUTING.md) about how to proceed.
Expand Down
94 changes: 43 additions & 51 deletions examples/01_getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,11 @@
"cells": [
{
"cell_type": "markdown",
"id": "3b1e5b84",
"id": "c5f44e87",
"metadata": {},
"source": [
"# pandas-render\n",
"\n",
"[pandas-render](https://github.com/nok/pandas-render) is a [pandas](https://github.com/pandas-dev/pandas) extension for rendering DataFrames and Series as HTML tables, with support for custom styling and formatting.\n",
"\n",
"Installation:\n",
"\n",
"```bash\n",
"pip install pandas-render\n",
"```\n",
"\n",
"## Getting Started\n",
"\n",
"This example shows how to use pandas-render to create a simple HTML table from a pandas DataFrame. It demonstrates how to use Jinja2 templates to format the content of each cell, and how to create links and images in the table.\n",
Expand All @@ -26,13 +18,13 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "80111e60",
"id": "16298615",
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-09T23:15:05.636164Z",
"iopub.status.busy": "2025-04-09T23:15:05.635773Z",
"iopub.status.idle": "2025-04-09T23:15:05.887448Z",
"shell.execute_reply": "2025-04-09T23:15:05.887060Z"
"iopub.execute_input": "2025-04-18T08:29:30.293505Z",
"iopub.status.busy": "2025-04-18T08:29:30.293403Z",
"iopub.status.idle": "2025-04-18T08:29:30.540217Z",
"shell.execute_reply": "2025-04-18T08:29:30.539905Z"
}
},
"outputs": [],
Expand All @@ -42,7 +34,7 @@
},
{
"cell_type": "markdown",
"id": "f8aade2f",
"id": "ad381e0c",
"metadata": {},
"source": [
"Or import it implicitly after importing pandas:\n",
Expand All @@ -55,7 +47,7 @@
},
{
"cell_type": "markdown",
"id": "71961e92",
"id": "0d715aa4",
"metadata": {},
"source": [
"### Data\n",
Expand All @@ -65,13 +57,13 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "e9c3dbaa",
"id": "f633cab9",
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-09T23:15:05.889445Z",
"iopub.status.busy": "2025-04-09T23:15:05.889287Z",
"iopub.status.idle": "2025-04-09T23:15:05.892493Z",
"shell.execute_reply": "2025-04-09T23:15:05.892125Z"
"iopub.execute_input": "2025-04-18T08:29:30.542200Z",
"iopub.status.busy": "2025-04-18T08:29:30.542036Z",
"iopub.status.idle": "2025-04-18T08:29:30.545306Z",
"shell.execute_reply": "2025-04-18T08:29:30.545014Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -108,7 +100,7 @@
},
{
"cell_type": "markdown",
"id": "d76c7c78",
"id": "f2856816",
"metadata": {},
"source": [
"Here is the original rendering of the DataFrame. It's a simple table with no formatting or styling. It's not very readable, and the data is not very visually appealing."
Expand All @@ -117,13 +109,13 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "da750110",
"id": "f2396934",
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-09T23:15:05.893902Z",
"iopub.status.busy": "2025-04-09T23:15:05.893802Z",
"iopub.status.idle": "2025-04-09T23:15:05.900891Z",
"shell.execute_reply": "2025-04-09T23:15:05.900647Z"
"iopub.execute_input": "2025-04-18T08:29:30.546734Z",
"iopub.status.busy": "2025-04-18T08:29:30.546637Z",
"iopub.status.idle": "2025-04-18T08:29:30.555636Z",
"shell.execute_reply": "2025-04-18T08:29:30.555380Z"
}
},
"outputs": [
Expand Down Expand Up @@ -216,7 +208,7 @@
},
{
"cell_type": "markdown",
"id": "2ce9de38",
"id": "43dcf205",
"metadata": {},
"source": [
"### Rendering\n",
Expand All @@ -226,13 +218,13 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "ddf0a87a",
"id": "351b70e6",
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-09T23:15:05.902207Z",
"iopub.status.busy": "2025-04-09T23:15:05.902096Z",
"iopub.status.idle": "2025-04-09T23:15:05.909596Z",
"shell.execute_reply": "2025-04-09T23:15:05.909299Z"
"iopub.execute_input": "2025-04-18T08:29:30.557067Z",
"iopub.status.busy": "2025-04-18T08:29:30.556928Z",
"iopub.status.idle": "2025-04-18T08:29:30.564057Z",
"shell.execute_reply": "2025-04-18T08:29:30.563756Z"
}
},
"outputs": [
Expand Down Expand Up @@ -267,7 +259,7 @@
},
{
"cell_type": "markdown",
"id": "5ef2c3ac",
"id": "5c9cc573",
"metadata": {},
"source": [
"### Filtering and Ordering\n",
Expand All @@ -277,13 +269,13 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "db762efb",
"id": "0f4f02db",
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-09T23:15:05.910954Z",
"iopub.status.busy": "2025-04-09T23:15:05.910857Z",
"iopub.status.idle": "2025-04-09T23:15:05.915410Z",
"shell.execute_reply": "2025-04-09T23:15:05.915146Z"
"iopub.execute_input": "2025-04-18T08:29:30.565390Z",
"iopub.status.busy": "2025-04-18T08:29:30.565294Z",
"iopub.status.idle": "2025-04-18T08:29:30.569915Z",
"shell.execute_reply": "2025-04-18T08:29:30.569630Z"
},
"lines_to_next_cell": 2
},
Expand Down Expand Up @@ -317,7 +309,7 @@
},
{
"cell_type": "markdown",
"id": "9edda3ec",
"id": "b33b7b0f",
"metadata": {},
"source": [
"### Dynamic Placeholder\n",
Expand All @@ -328,13 +320,13 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "e37324a3",
"id": "74b26e4a",
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-09T23:15:05.916698Z",
"iopub.status.busy": "2025-04-09T23:15:05.916602Z",
"iopub.status.idle": "2025-04-09T23:15:05.922364Z",
"shell.execute_reply": "2025-04-09T23:15:05.922104Z"
"iopub.execute_input": "2025-04-18T08:29:30.571157Z",
"iopub.status.busy": "2025-04-18T08:29:30.571063Z",
"iopub.status.idle": "2025-04-18T08:29:30.577175Z",
"shell.execute_reply": "2025-04-18T08:29:30.576889Z"
}
},
"outputs": [
Expand Down Expand Up @@ -415,7 +407,7 @@
},
{
"cell_type": "markdown",
"id": "80974ebd",
"id": "171615fe",
"metadata": {},
"source": [
"### Gallery\n",
Expand All @@ -425,13 +417,13 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "4dc6eb5f",
"id": "34d09fdd",
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-09T23:15:05.923691Z",
"iopub.status.busy": "2025-04-09T23:15:05.923606Z",
"iopub.status.idle": "2025-04-09T23:15:05.927855Z",
"shell.execute_reply": "2025-04-09T23:15:05.927566Z"
"iopub.execute_input": "2025-04-18T08:29:30.578645Z",
"iopub.status.busy": "2025-04-18T08:29:30.578521Z",
"iopub.status.idle": "2025-04-18T08:29:30.582906Z",
"shell.execute_reply": "2025-04-18T08:29:30.582620Z"
}
},
"outputs": [
Expand Down
8 changes: 0 additions & 8 deletions examples/01_getting_started.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# %% [markdown]
# # pandas-render
#
# [pandas-render](https://github.com/nok/pandas-render) is a [pandas](https://github.com/pandas-dev/pandas) extension for rendering DataFrames and Series as HTML tables, with support for custom styling and formatting.
#
# Installation:
#
# ```bash
# pip install pandas-render
# ```
#
# ## Getting Started
#
# This example shows how to use pandas-render to create a simple HTML table from a pandas DataFrame. It demonstrates how to use Jinja2 templates to format the content of each cell, and how to create links and images in the table.
Expand Down
Loading