pandas-render 0.2.1__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pandas_render-0.3.1/.gitignore +371 -0
- pandas_render-0.3.1/CHANGELOG.md +62 -0
- pandas_render-0.3.1/CONTRIBUTING.md +50 -0
- {pandas-render-0.2.1 → pandas_render-0.3.1}/LICENSE +2 -1
- pandas_render-0.3.1/PKG-INFO +103 -0
- pandas_render-0.3.1/README.md +79 -0
- pandas_render-0.3.1/assets/pandas-render.png +0 -0
- pandas_render-0.3.1/pandas_render/__init__.py +34 -0
- {pandas-render-0.2.1 → pandas_render-0.3.1}/pandas_render/base/Component.py +0 -1
- {pandas-render-0.2.1 → pandas_render-0.3.1}/pandas_render/base/Element.py +6 -3
- pandas_render-0.3.1/pandas_render/base/__init__.py +2 -0
- pandas_render-0.3.1/pandas_render/cli/__init__.py +0 -0
- pandas_render-0.3.1/pandas_render/cli/__main__.py +37 -0
- {pandas-render-0.2.1 → pandas_render-0.3.1}/pandas_render/components/Toggle.py +10 -8
- pandas_render-0.3.1/pandas_render/elements/Image.py +20 -0
- pandas_render-0.3.1/pandas_render/elements/Link.py +22 -0
- pandas_render-0.3.1/pandas_render/extensions/DataFrame.py +141 -0
- {pandas-render-0.2.1 → pandas_render-0.3.1}/pandas_render/extensions/Series.py +18 -15
- {pandas-render-0.2.1 → pandas_render-0.3.1}/pandas_render/extensions/__init__.py +11 -9
- pandas_render-0.3.1/pandas_render/utils.py +69 -0
- pandas_render-0.3.1/pyproject.toml +75 -0
- pandas_render-0.3.1/uv.lock +2260 -0
- pandas-render-0.2.1/PKG-INFO +0 -34
- pandas-render-0.2.1/README.md +0 -11
- pandas-render-0.2.1/pandas_render/__init__.py +0 -78
- pandas-render-0.2.1/pandas_render/base/__init__.py +0 -2
- pandas-render-0.2.1/pandas_render/elements/Image.py +0 -12
- pandas-render-0.2.1/pandas_render/elements/Link.py +0 -14
- pandas-render-0.2.1/pandas_render/extensions/DataFrame.py +0 -66
- pandas-render-0.2.1/pyproject.toml +0 -37
- pandas-render-0.2.1/setup.py +0 -34
- {pandas-render-0.2.1 → pandas_render-0.3.1}/pandas_render/components/__init__.py +0 -0
- {pandas-render-0.2.1 → pandas_render-0.3.1}/pandas_render/elements/__init__.py +0 -0
@@ -0,0 +1,371 @@
|
|
1
|
+
examples/dev_*.ipynb
|
2
|
+
|
3
|
+
# Created by https://www.toptal.com/developers/gitignore/api/macos,dotenv,python,windows,intellij,visualstudiocode
|
4
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,dotenv,python,windows,intellij,visualstudiocode
|
5
|
+
|
6
|
+
### dotenv ###
|
7
|
+
.env
|
8
|
+
|
9
|
+
### Intellij ###
|
10
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
11
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
12
|
+
|
13
|
+
# User-specific stuff
|
14
|
+
.idea/**/workspace.xml
|
15
|
+
.idea/**/tasks.xml
|
16
|
+
.idea/**/usage.statistics.xml
|
17
|
+
.idea/**/dictionaries
|
18
|
+
.idea/**/shelf
|
19
|
+
|
20
|
+
# AWS User-specific
|
21
|
+
.idea/**/aws.xml
|
22
|
+
|
23
|
+
# Generated files
|
24
|
+
.idea/**/contentModel.xml
|
25
|
+
|
26
|
+
# Sensitive or high-churn files
|
27
|
+
.idea/**/dataSources/
|
28
|
+
.idea/**/dataSources.ids
|
29
|
+
.idea/**/dataSources.local.xml
|
30
|
+
.idea/**/sqlDataSources.xml
|
31
|
+
.idea/**/dynamic.xml
|
32
|
+
.idea/**/uiDesigner.xml
|
33
|
+
.idea/**/dbnavigator.xml
|
34
|
+
|
35
|
+
# Gradle
|
36
|
+
.idea/**/gradle.xml
|
37
|
+
.idea/**/libraries
|
38
|
+
|
39
|
+
# Gradle and Maven with auto-import
|
40
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
41
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
42
|
+
# auto-import.
|
43
|
+
# .idea/artifacts
|
44
|
+
# .idea/compiler.xml
|
45
|
+
# .idea/jarRepositories.xml
|
46
|
+
# .idea/modules.xml
|
47
|
+
# .idea/*.iml
|
48
|
+
# .idea/modules
|
49
|
+
# *.iml
|
50
|
+
# *.ipr
|
51
|
+
|
52
|
+
# CMake
|
53
|
+
cmake-build-*/
|
54
|
+
|
55
|
+
# Mongo Explorer plugin
|
56
|
+
.idea/**/mongoSettings.xml
|
57
|
+
|
58
|
+
# File-based project format
|
59
|
+
*.iws
|
60
|
+
|
61
|
+
# IntelliJ
|
62
|
+
out/
|
63
|
+
|
64
|
+
# mpeltonen/sbt-idea plugin
|
65
|
+
.idea_modules/
|
66
|
+
|
67
|
+
# JIRA plugin
|
68
|
+
atlassian-ide-plugin.xml
|
69
|
+
|
70
|
+
# Cursive Clojure plugin
|
71
|
+
.idea/replstate.xml
|
72
|
+
|
73
|
+
# SonarLint plugin
|
74
|
+
.idea/sonarlint/
|
75
|
+
|
76
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
77
|
+
com_crashlytics_export_strings.xml
|
78
|
+
crashlytics.properties
|
79
|
+
crashlytics-build.properties
|
80
|
+
fabric.properties
|
81
|
+
|
82
|
+
# Editor-based Rest Client
|
83
|
+
.idea/httpRequests
|
84
|
+
|
85
|
+
# Android studio 3.1+ serialized cache file
|
86
|
+
.idea/caches/build_file_checksums.ser
|
87
|
+
|
88
|
+
### Intellij Patch ###
|
89
|
+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
90
|
+
|
91
|
+
# *.iml
|
92
|
+
# modules.xml
|
93
|
+
# .idea/misc.xml
|
94
|
+
# *.ipr
|
95
|
+
|
96
|
+
# Sonarlint plugin
|
97
|
+
# https://plugins.jetbrains.com/plugin/7973-sonarlint
|
98
|
+
.idea/**/sonarlint/
|
99
|
+
|
100
|
+
# SonarQube Plugin
|
101
|
+
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
|
102
|
+
.idea/**/sonarIssues.xml
|
103
|
+
|
104
|
+
# Markdown Navigator plugin
|
105
|
+
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
|
106
|
+
.idea/**/markdown-navigator.xml
|
107
|
+
.idea/**/markdown-navigator-enh.xml
|
108
|
+
.idea/**/markdown-navigator/
|
109
|
+
|
110
|
+
# Cache file creation bug
|
111
|
+
# See https://youtrack.jetbrains.com/issue/JBR-2257
|
112
|
+
.idea/$CACHE_FILE$
|
113
|
+
|
114
|
+
# CodeStream plugin
|
115
|
+
# https://plugins.jetbrains.com/plugin/12206-codestream
|
116
|
+
.idea/codestream.xml
|
117
|
+
|
118
|
+
# Azure Toolkit for IntelliJ plugin
|
119
|
+
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
|
120
|
+
.idea/**/azureSettings.xml
|
121
|
+
|
122
|
+
### macOS ###
|
123
|
+
# General
|
124
|
+
.DS_Store
|
125
|
+
.AppleDouble
|
126
|
+
.LSOverride
|
127
|
+
|
128
|
+
# Icon must end with two \r
|
129
|
+
Icon
|
130
|
+
|
131
|
+
|
132
|
+
# Thumbnails
|
133
|
+
._*
|
134
|
+
|
135
|
+
# Files that might appear in the root of a volume
|
136
|
+
.DocumentRevisions-V100
|
137
|
+
.fseventsd
|
138
|
+
.Spotlight-V100
|
139
|
+
.TemporaryItems
|
140
|
+
.Trashes
|
141
|
+
.VolumeIcon.icns
|
142
|
+
.com.apple.timemachine.donotpresent
|
143
|
+
|
144
|
+
# Directories potentially created on remote AFP share
|
145
|
+
.AppleDB
|
146
|
+
.AppleDesktop
|
147
|
+
Network Trash Folder
|
148
|
+
Temporary Items
|
149
|
+
.apdisk
|
150
|
+
|
151
|
+
### macOS Patch ###
|
152
|
+
# iCloud generated files
|
153
|
+
*.icloud
|
154
|
+
|
155
|
+
### Python ###
|
156
|
+
# Byte-compiled / optimized / DLL files
|
157
|
+
__pycache__/
|
158
|
+
*.py[cod]
|
159
|
+
*$py.class
|
160
|
+
|
161
|
+
# C extensions
|
162
|
+
*.so
|
163
|
+
|
164
|
+
# Distribution / packaging
|
165
|
+
.Python
|
166
|
+
build/
|
167
|
+
develop-eggs/
|
168
|
+
dist/
|
169
|
+
downloads/
|
170
|
+
eggs/
|
171
|
+
.eggs/
|
172
|
+
lib/
|
173
|
+
lib64/
|
174
|
+
parts/
|
175
|
+
sdist/
|
176
|
+
var/
|
177
|
+
wheels/
|
178
|
+
share/python-wheels/
|
179
|
+
*.egg-info/
|
180
|
+
.installed.cfg
|
181
|
+
*.egg
|
182
|
+
MANIFEST
|
183
|
+
|
184
|
+
# PyInstaller
|
185
|
+
# Usually these files are written by a python script from a template
|
186
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
187
|
+
*.manifest
|
188
|
+
*.spec
|
189
|
+
|
190
|
+
# Installer logs
|
191
|
+
pip-log.txt
|
192
|
+
pip-delete-this-directory.txt
|
193
|
+
|
194
|
+
# Unit test / coverage reports
|
195
|
+
htmlcov/
|
196
|
+
.tox/
|
197
|
+
.nox/
|
198
|
+
.coverage
|
199
|
+
.coverage.*
|
200
|
+
.cache
|
201
|
+
nosetests.xml
|
202
|
+
coverage.xml
|
203
|
+
*.cover
|
204
|
+
*.py,cover
|
205
|
+
.hypothesis/
|
206
|
+
.pytest_cache/
|
207
|
+
cover/
|
208
|
+
|
209
|
+
# Translations
|
210
|
+
*.mo
|
211
|
+
*.pot
|
212
|
+
|
213
|
+
# Django stuff:
|
214
|
+
*.log
|
215
|
+
local_settings.py
|
216
|
+
db.sqlite3
|
217
|
+
db.sqlite3-journal
|
218
|
+
|
219
|
+
# Flask stuff:
|
220
|
+
instance/
|
221
|
+
.webassets-cache
|
222
|
+
|
223
|
+
# Scrapy stuff:
|
224
|
+
.scrapy
|
225
|
+
|
226
|
+
# Sphinx documentation
|
227
|
+
docs/_build/
|
228
|
+
|
229
|
+
# PyBuilder
|
230
|
+
.pybuilder/
|
231
|
+
target/
|
232
|
+
|
233
|
+
# Jupyter Notebook
|
234
|
+
.ipynb_checkpoints
|
235
|
+
|
236
|
+
# IPython
|
237
|
+
profile_default/
|
238
|
+
ipython_config.py
|
239
|
+
|
240
|
+
# pyenv
|
241
|
+
# For a library or package, you might want to ignore these files since the code is
|
242
|
+
# intended to run in multiple environments; otherwise, check them in:
|
243
|
+
# .python-version
|
244
|
+
|
245
|
+
# pipenv
|
246
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
247
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
248
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
249
|
+
# install all needed dependencies.
|
250
|
+
#Pipfile.lock
|
251
|
+
|
252
|
+
# poetry
|
253
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
254
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
255
|
+
# commonly ignored for libraries.
|
256
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
257
|
+
#poetry.lock
|
258
|
+
|
259
|
+
# pdm
|
260
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
261
|
+
#pdm.lock
|
262
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
263
|
+
# in version control.
|
264
|
+
# https://pdm.fming.dev/#use-with-ide
|
265
|
+
.pdm.toml
|
266
|
+
|
267
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
268
|
+
__pypackages__/
|
269
|
+
|
270
|
+
# Celery stuff
|
271
|
+
celerybeat-schedule
|
272
|
+
celerybeat.pid
|
273
|
+
|
274
|
+
# SageMath parsed files
|
275
|
+
*.sage.py
|
276
|
+
|
277
|
+
# Environments
|
278
|
+
.venv
|
279
|
+
env/
|
280
|
+
venv/
|
281
|
+
ENV/
|
282
|
+
env.bak/
|
283
|
+
venv.bak/
|
284
|
+
|
285
|
+
# Spyder project settings
|
286
|
+
.spyderproject
|
287
|
+
.spyproject
|
288
|
+
|
289
|
+
# Rope project settings
|
290
|
+
.ropeproject
|
291
|
+
|
292
|
+
# mkdocs documentation
|
293
|
+
/site
|
294
|
+
|
295
|
+
# mypy
|
296
|
+
.mypy_cache/
|
297
|
+
.dmypy.json
|
298
|
+
dmypy.json
|
299
|
+
|
300
|
+
# Pyre type checker
|
301
|
+
.pyre/
|
302
|
+
|
303
|
+
# pytype static type analyzer
|
304
|
+
.pytype/
|
305
|
+
|
306
|
+
# Cython debug symbols
|
307
|
+
cython_debug/
|
308
|
+
|
309
|
+
# PyCharm
|
310
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
311
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
312
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
313
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
314
|
+
#.idea/
|
315
|
+
|
316
|
+
### Python Patch ###
|
317
|
+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
|
318
|
+
poetry.toml
|
319
|
+
|
320
|
+
# ruff
|
321
|
+
.ruff_cache/
|
322
|
+
|
323
|
+
# LSP config files
|
324
|
+
pyrightconfig.json
|
325
|
+
|
326
|
+
### VisualStudioCode ###
|
327
|
+
.vscode/*
|
328
|
+
!.vscode/settings.json
|
329
|
+
!.vscode/tasks.json
|
330
|
+
!.vscode/launch.json
|
331
|
+
!.vscode/extensions.json
|
332
|
+
!.vscode/*.code-snippets
|
333
|
+
|
334
|
+
# Local History for Visual Studio Code
|
335
|
+
.history/
|
336
|
+
|
337
|
+
# Built Visual Studio Code Extensions
|
338
|
+
*.vsix
|
339
|
+
|
340
|
+
### VisualStudioCode Patch ###
|
341
|
+
# Ignore all local history of files
|
342
|
+
.history
|
343
|
+
.ionide
|
344
|
+
|
345
|
+
### Windows ###
|
346
|
+
# Windows thumbnail cache files
|
347
|
+
Thumbs.db
|
348
|
+
Thumbs.db:encryptable
|
349
|
+
ehthumbs.db
|
350
|
+
ehthumbs_vista.db
|
351
|
+
|
352
|
+
# Dump file
|
353
|
+
*.stackdump
|
354
|
+
|
355
|
+
# Folder config file
|
356
|
+
[Dd]esktop.ini
|
357
|
+
|
358
|
+
# Recycle Bin used on file shares
|
359
|
+
$RECYCLE.BIN/
|
360
|
+
|
361
|
+
# Windows Installer files
|
362
|
+
*.cab
|
363
|
+
*.msi
|
364
|
+
*.msix
|
365
|
+
*.msm
|
366
|
+
*.msp
|
367
|
+
|
368
|
+
# Windows shortcuts
|
369
|
+
*.lnk
|
370
|
+
|
371
|
+
# End of https://www.toptal.com/developers/gitignore/api/macos,dotenv,python,windows,intellij,visualstudiocode
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## [0.3.1](https://github.com/nok/pandas-render/compare/v0.3.0...v0.3.1) (2025-04-21)
|
4
|
+
|
5
|
+
|
6
|
+
### Documentation
|
7
|
+
|
8
|
+
* Add support section ([4e0cea3](https://github.com/nok/pandas-render/commit/4e0cea3c4ff6357d9245ac61ef3fbb447b081dfd))
|
9
|
+
* Enclose installation commands in quotes ([b97c250](https://github.com/nok/pandas-render/commit/b97c2500598ef120897f56fad6b1e57efed290f3))
|
10
|
+
* Remove installation instructions and repository links from examples ([89fc056](https://github.com/nok/pandas-render/commit/89fc0569c36036b48b6ca6096816e183876e0378))
|
11
|
+
* Remove license badge ([f5e8483](https://github.com/nok/pandas-render/commit/f5e84835f745c8a1c447d03a655beea1293b3095))
|
12
|
+
* Use full image url ([d14fec3](https://github.com/nok/pandas-render/commit/d14fec36c49242c3966a68bf3c657c3e9cdbfa38))
|
13
|
+
|
14
|
+
## 0.3.0 (2025-04-16)
|
15
|
+
|
16
|
+
|
17
|
+
### ⚠ BREAKING CHANGES
|
18
|
+
|
19
|
+
* Rename 'columns' to 'templates' in rendering functions for clarity
|
20
|
+
|
21
|
+
### Features
|
22
|
+
|
23
|
+
* Add and support `polars` DataFrame and Series ([033e2ed](https://github.com/nok/pandas-render/commit/033e2ed2a6846b94629f0527ae0c082c1c662d4a))
|
24
|
+
* Add CLI command `pandas serve` for serving local files ([22df404](https://github.com/nok/pandas-render/commit/22df40499b97b183771e3a7e71acd9d66cca38fe))
|
25
|
+
* Add custom column names for rendered dataframes ([7406f68](https://github.com/nok/pandas-render/commit/7406f688c88022c6de8770f756305b32852a0f6b))
|
26
|
+
* Add examples ([258e92f](https://github.com/nok/pandas-render/commit/258e92f700fa27be92dce7dccfa1277bc34d8846))
|
27
|
+
* Add gallery rendering feature for DataFrames ([489c27e](https://github.com/nok/pandas-render/commit/489c27ea91381c255db7f46ee623d15e65a795d6))
|
28
|
+
* Add GitHub workflows for release and testing automation ([653ba4f](https://github.com/nok/pandas-render/commit/653ba4f6b96174a6cc54de14403bb3d95f403eb2))
|
29
|
+
* Add Makefile for linting, testing, and setup tasks ([9f88e56](https://github.com/nok/pandas-render/commit/9f88e56c2f23db44066cdc7f92b90459c4f633d3))
|
30
|
+
* Add option to hide table header ([42236be](https://github.com/nok/pandas-render/commit/42236be39e03512ec7ca5312fd3820a8490bf3d2))
|
31
|
+
* Enhance Image and Link elements with default attributes ([d846a07](https://github.com/nok/pandas-render/commit/d846a072aafc9f545480e9169753916a9dc779f5))
|
32
|
+
* Improve column order logic ([4037e76](https://github.com/nok/pandas-render/commit/4037e7635439b3e6f8730dcbfd3e58e51a1d728a))
|
33
|
+
|
34
|
+
|
35
|
+
### Bug Fixes
|
36
|
+
|
37
|
+
* Add missing dependencies ([88314c8](https://github.com/nok/pandas-render/commit/88314c8551031533fa503a3c6380cda0b02fdad0))
|
38
|
+
* Ease versions of dependencies (main) ([42721ae](https://github.com/nok/pandas-render/commit/42721ae852b11d1d4cdfb543a08867dcfe9cffa8))
|
39
|
+
* Update version number in tests to match current release ([bd9183f](https://github.com/nok/pandas-render/commit/bd9183f68d4adfebf6e9e5bc88caef247989c3ec))
|
40
|
+
|
41
|
+
|
42
|
+
### Documentation
|
43
|
+
|
44
|
+
* Add contributing guidelines and restructure development section in README ([8e9517c](https://github.com/nok/pandas-render/commit/8e9517c774d55e9b96d47505ec3388d2877e1f78))
|
45
|
+
* Add funding configuration ([b973af4](https://github.com/nok/pandas-render/commit/b973af4df10a9cbf77887d1808e98b8165a6b370))
|
46
|
+
* Add note on following Conventional Commits standard ([3d97b40](https://github.com/nok/pandas-render/commit/3d97b403d703cd2c450b527c90b86a306bc5b106))
|
47
|
+
* Adjust image height in README for better display ([43c3776](https://github.com/nok/pandas-render/commit/43c377610cc1e5db1720adb9eb3c0fbf567f84b8))
|
48
|
+
* Enhance README and examples ([5b1502e](https://github.com/nok/pandas-render/commit/5b1502e001e332f87bf684176bb3f91a6897847f))
|
49
|
+
* Fix links in README for contributing guidelines and license ([a734694](https://github.com/nok/pandas-render/commit/a734694f8f1fc69fc14b93121deb72d7a4962242))
|
50
|
+
* Update badge links for clarity and consistency ([25511ba](https://github.com/nok/pandas-render/commit/25511ba74faee3ae1a9a747a37f688a8d5b97ae8))
|
51
|
+
* Update README to include development instructions and uv package management ([721c331](https://github.com/nok/pandas-render/commit/721c33129e87dca4f96efcd5285833c9ffa6d278))
|
52
|
+
* Update README with enhanced description and add logo image ([a00e6cb](https://github.com/nok/pandas-render/commit/a00e6cbe2eb8fe859a88f489d83eae6303d30692))
|
53
|
+
|
54
|
+
|
55
|
+
### Miscellaneous Chores
|
56
|
+
|
57
|
+
* Release 0.3.0 ([67dc2a7](https://github.com/nok/pandas-render/commit/67dc2a795fe708bdf3ad565204bd213f3c37bf9c))
|
58
|
+
|
59
|
+
|
60
|
+
### Code Refactoring
|
61
|
+
|
62
|
+
* Rename 'columns' to 'templates' in rendering functions for clarity ([5f0dbe8](https://github.com/nok/pandas-render/commit/5f0dbe85f52ed79788a04c3c3d5db4cbc6c7f81f))
|
@@ -0,0 +1,50 @@
|
|
1
|
+
## Development
|
2
|
+
|
3
|
+
We rely on [uv](https://docs.astral.sh/uv/) for package management. Ensure uv is installed before proceeding.
|
4
|
+
|
5
|
+
In addition we follow the [Conventional Commits](https://www.conventionalcommits.org/) standard to maintain a clear and organized commit history.
|
6
|
+
|
7
|
+
### Environment
|
8
|
+
|
9
|
+
To create a new local environment in `./.venv`, run:
|
10
|
+
```bash
|
11
|
+
uv sync --all-groups
|
12
|
+
```
|
13
|
+
|
14
|
+
Alternatively, execute:
|
15
|
+
```bash
|
16
|
+
make setup
|
17
|
+
```
|
18
|
+
|
19
|
+
Both commands will set up your environment with the necessary dependencies.
|
20
|
+
|
21
|
+
### Testing
|
22
|
+
|
23
|
+
To run all unit tests based on [pytest](https://github.com/pytest-dev/pytest/), run:
|
24
|
+
```bash
|
25
|
+
uv run pytest --cov-report term --cov-report html --cov
|
26
|
+
```
|
27
|
+
|
28
|
+
Alternatively, execute:
|
29
|
+
```bash
|
30
|
+
make test
|
31
|
+
```
|
32
|
+
|
33
|
+
### Linting
|
34
|
+
|
35
|
+
We use [ruff](https://github.com/astral-sh/ruff) for linting.
|
36
|
+
|
37
|
+
Install ruff using:
|
38
|
+
```bash
|
39
|
+
uv tool install ruff
|
40
|
+
```
|
41
|
+
|
42
|
+
Run the following command to analyze linting issues:
|
43
|
+
```bash
|
44
|
+
uvx ruff check .
|
45
|
+
```
|
46
|
+
|
47
|
+
Alternatively, execute:
|
48
|
+
```bash
|
49
|
+
make lint
|
50
|
+
```
|
@@ -0,0 +1,103 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: pandas-render
|
3
|
+
Version: 0.3.1
|
4
|
+
Summary: A pandas extension for rendering DataFrames
|
5
|
+
Project-URL: Repository, https://github.com/nok/pandas-render
|
6
|
+
Project-URL: Issues, https://github.com/nok/pandas-render/issues
|
7
|
+
Author-email: Darius Morawiec <nok@users.noreply.github.com>
|
8
|
+
License-Expression: BSD-3-Clause
|
9
|
+
License-File: LICENSE
|
10
|
+
Classifier: Programming Language :: Python
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
12
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
13
|
+
Requires-Python: >=3.9
|
14
|
+
Requires-Dist: ipython>=7.11.1
|
15
|
+
Requires-Dist: jinja2>=3.0.0
|
16
|
+
Requires-Dist: typer>=0.15.2
|
17
|
+
Provides-Extra: examples
|
18
|
+
Requires-Dist: jupyterlab>=4.3.6; extra == 'examples'
|
19
|
+
Provides-Extra: pandas
|
20
|
+
Requires-Dist: pandas>=1.0.0; extra == 'pandas'
|
21
|
+
Provides-Extra: polars
|
22
|
+
Requires-Dist: polars>=1.0.0; extra == 'polars'
|
23
|
+
Description-Content-Type: text/markdown
|
24
|
+
|
25
|
+
<p align="center">
|
26
|
+
<img src="https://raw.githubusercontent.com/nok/pandas-render/refs/heads/main/assets/pandas-render.png" alt="pandas-render" height=130>
|
27
|
+
</p>
|
28
|
+
|
29
|
+
<h1 align="center">pandas-render</h1>
|
30
|
+
|
31
|
+
<p align="center">Render <a href="https://github.com/pandas-dev/pandas" target="_pandas">pandas</a> or <a href="https://github.com/pola-rs/polars" target="_polars">polars</a> DataFrames and Series as HTML tables with flexibility for formatting and styling.</p>
|
32
|
+
|
33
|
+
<div align="center">
|
34
|
+
|
35
|
+

|
36
|
+
[](https://ko-fi.com/nok)
|
37
|
+
|
38
|
+
</div>
|
39
|
+
|
40
|
+
|
41
|
+
## Installation
|
42
|
+
|
43
|
+
```bash
|
44
|
+
pip install "pandas-render[pandas]"
|
45
|
+
```
|
46
|
+
|
47
|
+
```bash
|
48
|
+
pip install "pandas-render[polars]"
|
49
|
+
```
|
50
|
+
|
51
|
+
|
52
|
+
## Usage
|
53
|
+
|
54
|
+
This is a simple example that demonstrates the basic functionality. The column names are used to match individual [Jinja2](https://github.com/pallets/jinja) templates. And `{{ content }}` is the placeholder for the content of the original cell.
|
55
|
+
|
56
|
+
```python
|
57
|
+
from pandas_render import pandas as pd
|
58
|
+
|
59
|
+
df = pd.DataFrame(
|
60
|
+
[
|
61
|
+
dict(name="Alice", age=25, hobbies=["coding"]),
|
62
|
+
dict(name="Bob", age=30, hobbies=["reading", "hiking"]),
|
63
|
+
]
|
64
|
+
)
|
65
|
+
|
66
|
+
df.render(
|
67
|
+
templates=dict(
|
68
|
+
name="<strong>{{ content }}</strong>",
|
69
|
+
age="{{ content }} years old",
|
70
|
+
hobbies="<em>{{ content|join(', ') }}</em>",
|
71
|
+
),
|
72
|
+
table_column_names=["Name", "Age", "Hobbies"],
|
73
|
+
)
|
74
|
+
```
|
75
|
+
|
76
|
+
The result is a rendered dataframe:
|
77
|
+
|
78
|
+
<table class="dataframe"><thead><tr><th>Name</th><th>Age</th><th>Hobbies</th></tr></thead><tbody><tr><td><strong>Alice</strong></td><td>25 years old</td><td><em>coding</em></td></tr><tr><td><strong>Bob</strong></td><td>30 years old</td><td><em>reading, hiking</em></td></tr></tbody></table>
|
79
|
+
|
80
|
+
|
81
|
+
## Examples
|
82
|
+
|
83
|
+
Exciting and more powerful features can be explored and learned in the [Getting Started](examples/01_getting_started.ipynb) notebook.
|
84
|
+
|
85
|
+
List of all notebooks with examples:
|
86
|
+
|
87
|
+
- [Getting Started](examples/01_getting_started.ipynb) ✨
|
88
|
+
- [Components](examples/02_components.ipynb)
|
89
|
+
|
90
|
+
|
91
|
+
## Support
|
92
|
+
|
93
|
+
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!
|
94
|
+
|
95
|
+
|
96
|
+
## Contributing
|
97
|
+
|
98
|
+
We encourage you to contribute to this project! Please check out the [contributing guidelines](CONTRIBUTING.md) about how to proceed.
|
99
|
+
|
100
|
+
|
101
|
+
## License
|
102
|
+
|
103
|
+
This package is Open Source Software released under the [BSD-3-Clause](LICENSE) license.
|
@@ -0,0 +1,79 @@
|
|
1
|
+
<p align="center">
|
2
|
+
<img src="https://raw.githubusercontent.com/nok/pandas-render/refs/heads/main/assets/pandas-render.png" alt="pandas-render" height=130>
|
3
|
+
</p>
|
4
|
+
|
5
|
+
<h1 align="center">pandas-render</h1>
|
6
|
+
|
7
|
+
<p align="center">Render <a href="https://github.com/pandas-dev/pandas" target="_pandas">pandas</a> or <a href="https://github.com/pola-rs/polars" target="_polars">polars</a> DataFrames and Series as HTML tables with flexibility for formatting and styling.</p>
|
8
|
+
|
9
|
+
<div align="center">
|
10
|
+
|
11
|
+

|
12
|
+
[](https://ko-fi.com/nok)
|
13
|
+
|
14
|
+
</div>
|
15
|
+
|
16
|
+
|
17
|
+
## Installation
|
18
|
+
|
19
|
+
```bash
|
20
|
+
pip install "pandas-render[pandas]"
|
21
|
+
```
|
22
|
+
|
23
|
+
```bash
|
24
|
+
pip install "pandas-render[polars]"
|
25
|
+
```
|
26
|
+
|
27
|
+
|
28
|
+
## Usage
|
29
|
+
|
30
|
+
This is a simple example that demonstrates the basic functionality. The column names are used to match individual [Jinja2](https://github.com/pallets/jinja) templates. And `{{ content }}` is the placeholder for the content of the original cell.
|
31
|
+
|
32
|
+
```python
|
33
|
+
from pandas_render import pandas as pd
|
34
|
+
|
35
|
+
df = pd.DataFrame(
|
36
|
+
[
|
37
|
+
dict(name="Alice", age=25, hobbies=["coding"]),
|
38
|
+
dict(name="Bob", age=30, hobbies=["reading", "hiking"]),
|
39
|
+
]
|
40
|
+
)
|
41
|
+
|
42
|
+
df.render(
|
43
|
+
templates=dict(
|
44
|
+
name="<strong>{{ content }}</strong>",
|
45
|
+
age="{{ content }} years old",
|
46
|
+
hobbies="<em>{{ content|join(', ') }}</em>",
|
47
|
+
),
|
48
|
+
table_column_names=["Name", "Age", "Hobbies"],
|
49
|
+
)
|
50
|
+
```
|
51
|
+
|
52
|
+
The result is a rendered dataframe:
|
53
|
+
|
54
|
+
<table class="dataframe"><thead><tr><th>Name</th><th>Age</th><th>Hobbies</th></tr></thead><tbody><tr><td><strong>Alice</strong></td><td>25 years old</td><td><em>coding</em></td></tr><tr><td><strong>Bob</strong></td><td>30 years old</td><td><em>reading, hiking</em></td></tr></tbody></table>
|
55
|
+
|
56
|
+
|
57
|
+
## Examples
|
58
|
+
|
59
|
+
Exciting and more powerful features can be explored and learned in the [Getting Started](examples/01_getting_started.ipynb) notebook.
|
60
|
+
|
61
|
+
List of all notebooks with examples:
|
62
|
+
|
63
|
+
- [Getting Started](examples/01_getting_started.ipynb) ✨
|
64
|
+
- [Components](examples/02_components.ipynb)
|
65
|
+
|
66
|
+
|
67
|
+
## Support
|
68
|
+
|
69
|
+
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!
|
70
|
+
|
71
|
+
|
72
|
+
## Contributing
|
73
|
+
|
74
|
+
We encourage you to contribute to this project! Please check out the [contributing guidelines](CONTRIBUTING.md) about how to proceed.
|
75
|
+
|
76
|
+
|
77
|
+
## License
|
78
|
+
|
79
|
+
This package is Open Source Software released under the [BSD-3-Clause](LICENSE) license.
|
Binary file
|