itables 2.2.3__tar.gz → 2.2.5__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.
- itables-2.2.5/.gitattributes +1 -0
- {itables-2.2.3 → itables-2.2.5}/.gitignore +3 -0
- {itables-2.2.3 → itables-2.2.5}/LICENSE +1 -1
- {itables-2.2.3 → itables-2.2.5}/PKG-INFO +4 -3
- {itables-2.2.3 → itables-2.2.5}/README.md +1 -0
- {itables-2.2.3 → itables-2.2.5}/docs/changelog.md +15 -0
- {itables-2.2.3 → itables-2.2.5}/docs/quick_start.md +1 -0
- {itables-2.2.3 → itables-2.2.5}/packages/itables_for_streamlit/package-lock.json +17 -13
- {itables-2.2.3 → itables-2.2.5}/src/itables/datatables_format.py +1 -1
- {itables-2.2.3 → itables-2.2.5}/src/itables/downsample.py +2 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/javascript.py +7 -10
- {itables-2.2.3 → itables-2.2.5}/src/itables/version.py +1 -1
- {itables-2.2.3 → itables-2.2.5}/tests/test_downsample.py +7 -0
- itables-2.2.5/tests/test_shiny.py +29 -0
- {itables-2.2.3 → itables-2.2.5}/.github/codecov.yml +0 -0
- {itables-2.2.3 → itables-2.2.5}/.github/workflows/comment-pr.yml +0 -0
- {itables-2.2.3 → itables-2.2.5}/.github/workflows/continuous-integration.yml +0 -0
- {itables-2.2.3 → itables-2.2.5}/.github/workflows/publish-book.yml +0 -0
- {itables-2.2.3 → itables-2.2.5}/.github/workflows/publish.yml +0 -0
- {itables-2.2.3 → itables-2.2.5}/.pre-commit-config.yaml +0 -0
- {itables-2.2.3 → itables-2.2.5}/.pylintrc +0 -0
- {itables-2.2.3 → itables-2.2.5}/binder/labconfig/default_setting_overrides.json +0 -0
- {itables-2.2.3 → itables-2.2.5}/binder/postBuild +0 -0
- {itables-2.2.3 → itables-2.2.5}/binder/requirements.txt +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/_config.yml +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/_toc.yml +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/advanced_parameters.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/contributing.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/custom_css.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/custom_extensions.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/dark_mode.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/dash.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/developing.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/df_example.png +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/downsampling.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/extensions.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/formatting.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/html_export.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/images/code.png +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/images/colab.png +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/images/html.png +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/images/lab.png +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/images/notebook.png +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/images/pycharm.png +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/pandas_style.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/polars_dataframes.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/quarto/quarto_html.qmd +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/quarto/quarto_revealjs.qmd +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/quarto.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/references.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/sample_dataframes.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/select.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/shiny.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/show_df.png +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/streamlit.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/supported_editors.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/troubleshooting.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/docs/widget.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/environment.yml +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/dt_for_itables/CHANGELOG.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/dt_for_itables/LICENSE +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/dt_for_itables/README.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/dt_for_itables/package-lock.json +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/dt_for_itables/package.json +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/dt_for_itables/src/index.css +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/dt_for_itables/src/index.d.ts +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/dt_for_itables/src/index.js +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/itables_anywidget/README.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/itables_anywidget/js/widget.css +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/itables_anywidget/js/widget.ts +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/itables_anywidget/package-lock.json +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/itables_anywidget/package.json +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/itables_anywidget/tsconfig.json +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/itables_for_streamlit/README.md +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/itables_for_streamlit/package.json +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/itables_for_streamlit/public/index.html +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/itables_for_streamlit/src/index.tsx +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/itables_for_streamlit/tsconfig.json +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/package-lock.json +0 -0
- {itables-2.2.3 → itables-2.2.5}/packages/package.json +0 -0
- {itables-2.2.3 → itables-2.2.5}/pyproject.toml +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/__init__.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/html/column_filters/initComplete.js +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/html/column_filters/pre_dt_code.js +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/html/datatables_template.html +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/html/dt_bundle.css +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/html/dt_bundle.js +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/html/init_datatables.html +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/interactive.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/itables_for_streamlit/asset-manifest.json +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/itables_for_streamlit/index.html +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/itables_for_streamlit/static/css/main.b5025928.css +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/itables_for_streamlit/static/css/main.b5025928.css.map +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/itables_for_streamlit/static/js/main.f651d116.js +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/itables_for_streamlit/static/js/main.f651d116.js.LICENSE.txt +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/itables_for_streamlit/static/js/main.f651d116.js.map +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/logo/loading.svg +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/logo/logo.svg +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/logo/text.svg +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/logo/wide.svg +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/logo/with_text.svg +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/options.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/sample_dfs.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/samples/countries.csv +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/samples/indicators.csv +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/samples/population.csv +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/shiny.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/streamlit.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/utils.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/widget/__init__.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/widget/static/widget.css +0 -0
- {itables-2.2.3 → itables-2.2.5}/src/itables/widget/static/widget.js +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/__init__.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/conftest.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/test_changelog.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/test_connected_notebook_is_small.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/test_datatables_format.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/test_documentation_notebooks_run.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/test_extension_arguments.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/test_html_in_table_header.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/test_init.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/test_javascript.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/test_json_dumps.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/test_notebook.ipynb +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/test_pandas_style.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/test_polars.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/test_sample_dfs.py +0 -0
- {itables-2.2.3 → itables-2.2.5}/tests/test_update_samples.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*.ipynb linguist-documentation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: itables
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.5
|
|
4
4
|
Summary: Pandas and Polar DataFrames as interactive DataTables
|
|
5
5
|
Project-URL: Homepage, https://mwouts.github.io/itables/
|
|
6
6
|
Project-URL: Documentation, https://mwouts.github.io/itables
|
|
@@ -11,7 +11,7 @@ Author-email: Marc Wouts <marc.wouts@gmail.com>
|
|
|
11
11
|
Maintainer-email: Marc Wouts <marc.wouts@gmail.com>
|
|
12
12
|
License: MIT License
|
|
13
13
|
|
|
14
|
-
Copyright (c) 2019-
|
|
14
|
+
Copyright (c) 2019-2025 Marc Wouts
|
|
15
15
|
|
|
16
16
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
17
17
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -107,6 +107,7 @@ Description-Content-Type: text/markdown
|
|
|
107
107
|
|
|
108
108
|
[](https://github.com/mwouts/itables/actions)
|
|
109
109
|
[](https://codecov.io/github/mwouts/itables?branch=main)
|
|
110
|
+
[](LICENSE)
|
|
110
111
|
[](https://pypi.python.org/pypi/itables)
|
|
111
112
|
[](https://anaconda.org/conda-forge/itables)
|
|
112
113
|
[](https://pypi.python.org/pypi/itables)
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/mwouts/itables/actions)
|
|
4
4
|
[](https://codecov.io/github/mwouts/itables?branch=main)
|
|
5
|
+
[](LICENSE)
|
|
5
6
|
[](https://pypi.python.org/pypi/itables)
|
|
6
7
|
[](https://anaconda.org/conda-forge/itables)
|
|
7
8
|
[](https://pypi.python.org/pypi/itables)
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
ITables ChangeLog
|
|
2
2
|
=================
|
|
3
3
|
|
|
4
|
+
2.2.5 (2025-02-22)
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
**Fixed**
|
|
8
|
+
- We have removed an erroneous assertion and added tests on the warnings issued when selected rows are not displayed ([[#351](https://github.com/mwouts/itables/issues/351)])
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
2.2.4 (2024-12-07)
|
|
12
|
+
------------------
|
|
13
|
+
|
|
14
|
+
**Fixed**
|
|
15
|
+
- We have fixed an issue with the HTML export of multiple tables in the same cell ([#338](https://github.com/mwouts/itables/issues/338))
|
|
16
|
+
- The dependencies of the Streamlit component have been updated ([#343](https://github.com/mwouts/itables/pull/343), [#345](https://github.com/mwouts/itables/pull/345))
|
|
17
|
+
|
|
18
|
+
|
|
4
19
|
2.2.3 (2024-11-01)
|
|
5
20
|
------------------
|
|
6
21
|
|
|
@@ -16,6 +16,7 @@ kernelspec:
|
|
|
16
16
|
|
|
17
17
|
[](https://github.com/mwouts/itables/actions)
|
|
18
18
|
[](https://codecov.io/github/mwouts/itables?branch=main)
|
|
19
|
+
[](https://github.com/mwouts/itables/blob/main/LICENSE)
|
|
19
20
|
[](https://pypi.python.org/pypi/itables)
|
|
20
21
|
[](https://anaconda.org/conda-forge/itables)
|
|
21
22
|
[](https://pypi.python.org/pypi/itables)
|
|
@@ -6221,9 +6221,9 @@
|
|
|
6221
6221
|
}
|
|
6222
6222
|
},
|
|
6223
6223
|
"node_modules/cross-spawn": {
|
|
6224
|
-
"version": "7.0.
|
|
6225
|
-
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.
|
|
6226
|
-
"integrity": "sha512-
|
|
6224
|
+
"version": "7.0.6",
|
|
6225
|
+
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
|
6226
|
+
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
|
6227
6227
|
"dependencies": {
|
|
6228
6228
|
"path-key": "^3.1.0",
|
|
6229
6229
|
"shebang-command": "^2.0.0",
|
|
@@ -8055,9 +8055,9 @@
|
|
|
8055
8055
|
}
|
|
8056
8056
|
},
|
|
8057
8057
|
"node_modules/express": {
|
|
8058
|
-
"version": "4.21.
|
|
8059
|
-
"resolved": "https://registry.npmjs.org/express/-/express-4.21.
|
|
8060
|
-
"integrity": "sha512-
|
|
8058
|
+
"version": "4.21.2",
|
|
8059
|
+
"resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
|
|
8060
|
+
"integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
|
|
8061
8061
|
"dependencies": {
|
|
8062
8062
|
"accepts": "~1.3.8",
|
|
8063
8063
|
"array-flatten": "1.1.1",
|
|
@@ -8078,7 +8078,7 @@
|
|
|
8078
8078
|
"methods": "~1.1.2",
|
|
8079
8079
|
"on-finished": "2.4.1",
|
|
8080
8080
|
"parseurl": "~1.3.3",
|
|
8081
|
-
"path-to-regexp": "0.1.
|
|
8081
|
+
"path-to-regexp": "0.1.12",
|
|
8082
8082
|
"proxy-addr": "~2.0.7",
|
|
8083
8083
|
"qs": "6.13.0",
|
|
8084
8084
|
"range-parser": "~1.2.1",
|
|
@@ -8093,6 +8093,10 @@
|
|
|
8093
8093
|
},
|
|
8094
8094
|
"engines": {
|
|
8095
8095
|
"node": ">= 0.10.0"
|
|
8096
|
+
},
|
|
8097
|
+
"funding": {
|
|
8098
|
+
"type": "opencollective",
|
|
8099
|
+
"url": "https://opencollective.com/express"
|
|
8096
8100
|
}
|
|
8097
8101
|
},
|
|
8098
8102
|
"node_modules/express/node_modules/debug": {
|
|
@@ -12552,9 +12556,9 @@
|
|
|
12552
12556
|
}
|
|
12553
12557
|
},
|
|
12554
12558
|
"node_modules/nanoid": {
|
|
12555
|
-
"version": "3.3.
|
|
12556
|
-
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.
|
|
12557
|
-
"integrity": "sha512-
|
|
12559
|
+
"version": "3.3.8",
|
|
12560
|
+
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
|
|
12561
|
+
"integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
|
|
12558
12562
|
"funding": [
|
|
12559
12563
|
{
|
|
12560
12564
|
"type": "github",
|
|
@@ -13062,9 +13066,9 @@
|
|
|
13062
13066
|
}
|
|
13063
13067
|
},
|
|
13064
13068
|
"node_modules/path-to-regexp": {
|
|
13065
|
-
"version": "0.1.
|
|
13066
|
-
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.
|
|
13067
|
-
"integrity": "sha512-
|
|
13069
|
+
"version": "0.1.12",
|
|
13070
|
+
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
|
|
13071
|
+
"integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ=="
|
|
13068
13072
|
},
|
|
13069
13073
|
"node_modules/path-type": {
|
|
13070
13074
|
"version": "4.0.0",
|
|
@@ -96,6 +96,7 @@ def _downsample(df, max_rows=0, max_columns=0, max_bytes=0, target_aspect_ratio=
|
|
|
96
96
|
if len(df) > max_rows > 0:
|
|
97
97
|
second_half = max_rows // 2
|
|
98
98
|
first_half = max_rows - second_half
|
|
99
|
+
assert first_half >= second_half
|
|
99
100
|
if second_half:
|
|
100
101
|
try:
|
|
101
102
|
df = pd.concat((df.iloc[:first_half], df.iloc[-second_half:]))
|
|
@@ -110,6 +111,7 @@ def _downsample(df, max_rows=0, max_columns=0, max_bytes=0, target_aspect_ratio=
|
|
|
110
111
|
if len(df.columns) > max_columns > 0:
|
|
111
112
|
second_half = max_columns // 2
|
|
112
113
|
first_half = max_columns - second_half
|
|
114
|
+
assert first_half >= second_half
|
|
113
115
|
if second_half:
|
|
114
116
|
try:
|
|
115
117
|
df = pd.concat(
|
|
@@ -115,10 +115,7 @@ def init_notebook_mode(
|
|
|
115
115
|
def get_animated_logo(display_logo_when_loading):
|
|
116
116
|
if not display_logo_when_loading:
|
|
117
117
|
return ""
|
|
118
|
-
return f"
|
|
119
|
-
<a href=https://mwouts.github.io/itables/>{read_package_file("logo/loading.svg")}</a>
|
|
120
|
-
</div>
|
|
121
|
-
"""
|
|
118
|
+
return f"<a href=https://mwouts.github.io/itables/>{read_package_file('logo/loading.svg')}</a>"
|
|
122
119
|
|
|
123
120
|
|
|
124
121
|
def generate_init_offline_itables_html(dt_bundle: Path):
|
|
@@ -172,10 +169,9 @@ def _table_header(
|
|
|
172
169
|
)
|
|
173
170
|
tbody = f"""<tr>
|
|
174
171
|
<td style="vertical-align:middle; text-align:left">
|
|
175
|
-
{get_animated_logo(display_logo_when_loading)}
|
|
172
|
+
{get_animated_logo(display_logo_when_loading)}
|
|
176
173
|
Loading ITables v{itables_version} from {itables_source}...
|
|
177
174
|
(need <a href=https://mwouts.github.io/itables/troubleshooting.html>help</a>?)</td>
|
|
178
|
-
</div>
|
|
179
175
|
</tr>"""
|
|
180
176
|
|
|
181
177
|
if style:
|
|
@@ -603,11 +599,12 @@ def warn_if_selected_rows_are_not_visible(
|
|
|
603
599
|
if full_row_count == data_row_count:
|
|
604
600
|
return selected_rows
|
|
605
601
|
|
|
606
|
-
|
|
607
|
-
|
|
602
|
+
second_half = data_row_count // 2
|
|
603
|
+
first_half = data_row_count - second_half
|
|
604
|
+
assert first_half >= second_half
|
|
608
605
|
|
|
609
|
-
bottom_limit =
|
|
610
|
-
top_limit = full_row_count -
|
|
606
|
+
bottom_limit = first_half
|
|
607
|
+
top_limit = full_row_count - second_half
|
|
611
608
|
|
|
612
609
|
if warn_on_selected_rows_not_rendered and any(
|
|
613
610
|
bottom_limit <= i < top_limit for i in selected_rows
|
|
@@ -117,3 +117,10 @@ def test_df_with_many_columns_is_downsampled_preferentially_on_columns(df, max_b
|
|
|
117
117
|
else:
|
|
118
118
|
# aspect ratio is close to 1
|
|
119
119
|
assert 0.5 < len(dn) / len(dn.columns) < 2
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def test_downsample_to_odd_number_of_rows():
|
|
123
|
+
df = pd.DataFrame({"x": range(17)})
|
|
124
|
+
dn, _ = downsample(df, max_rows=3)
|
|
125
|
+
assert len(dn) == 3
|
|
126
|
+
assert dn["x"].to_list() == [0, 1, 16]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import warnings
|
|
2
|
+
|
|
3
|
+
import pandas as pd
|
|
4
|
+
import pytest
|
|
5
|
+
|
|
6
|
+
from itables.downsample import downsample
|
|
7
|
+
from itables.shiny import DT
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_select_on_downsampled_df():
|
|
11
|
+
"""
|
|
12
|
+
When a DF of 17 rows is downsampled to 3 rows,
|
|
13
|
+
we can only select rows 0, 1, 16
|
|
14
|
+
"""
|
|
15
|
+
df = pd.DataFrame({"x": range(17)})
|
|
16
|
+
dn, _ = downsample(df, max_rows=3)
|
|
17
|
+
assert len(dn) == 3
|
|
18
|
+
|
|
19
|
+
with warnings.catch_warnings():
|
|
20
|
+
warnings.simplefilter("error")
|
|
21
|
+
DT(df, maxRows=3, selected_rows=[0, 1, 16])
|
|
22
|
+
|
|
23
|
+
for row in [-1, 17]:
|
|
24
|
+
with pytest.raises(IndexError, match="Selected rows out of range"):
|
|
25
|
+
DT(df, maxRows=3, selected_rows=[row])
|
|
26
|
+
|
|
27
|
+
for row in [2, 15]:
|
|
28
|
+
with pytest.warns(match="no row with index between 2 and 15 can be selected"):
|
|
29
|
+
DT(df, maxRows=3, selected_rows=[row])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{itables-2.2.3 → itables-2.2.5}/src/itables/itables_for_streamlit/static/css/main.b5025928.css
RENAMED
|
File without changes
|
{itables-2.2.3 → itables-2.2.5}/src/itables/itables_for_streamlit/static/css/main.b5025928.css.map
RENAMED
|
File without changes
|
{itables-2.2.3 → itables-2.2.5}/src/itables/itables_for_streamlit/static/js/main.f651d116.js
RENAMED
|
File without changes
|
|
File without changes
|
{itables-2.2.3 → itables-2.2.5}/src/itables/itables_for_streamlit/static/js/main.f651d116.js.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|