diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index f949bb7..bdd207e 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -26,6 +26,7 @@ jobs: run: | mkdir -p public cp -r mysiar-data-flow public/ + cp -r st_df_table public/ touch public/check.txt - name: List publish folder diff --git a/Makefile b/Makefile index 3697009..c49ee2a 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,14 @@ venv:: python -m venv venv venv/bin/pip install -U pip venv/bin/pip install -r requirements.txt - venv/bin/pip install -r ../python-data-flow/requirements.txt + $(MAKE) pip +pip:: + venv/bin/pip install -r ../python-data-flow/requirements.txt + venv/bin/pip install -r ../st-table/requirements.txt docs:: venv/bin/pdoc --template-dir docs-templates ../python-data-flow/mysiar_data_flow/ -o mysiar-data-flow/ + venv/bin/pdoc --template-dir docs-templates ../st-table/st_df_table/ !st_df_table.example -o st_df_table/ + #rm -rf ./st_df_table/st_df_table/example.html diff --git a/requirements.txt b/requirements.txt index 542ba69..50cf05a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ pdoc -markdown \ No newline at end of file +markdown +st-df-table \ No newline at end of file diff --git a/st_df_table/index.html b/st_df_table/index.html new file mode 100644 index 0000000..dae884d --- /dev/null +++ b/st_df_table/index.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/st_df_table/search.js b/st_df_table/search.js new file mode 100644 index 0000000..4412050 --- /dev/null +++ b/st_df_table/search.js @@ -0,0 +1,46 @@ +window.pdocSearch = (function(){ +/** elasticlunr - http://weixsong.github.io * Copyright (C) 2017 Oliver Nightingale * Copyright (C) 2017 Wei Song * MIT Licensed */!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.9.5",lunr=t,t.utils={},t.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),t.utils.toString=function(e){return void 0===e||null===e?"":e.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},t.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);-1!==n&&(this.events[e].splice(n,1),0==this.events[e].length&&delete this.events[e])}},t.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},t.EventEmitter.prototype.hasHandler=function(e){return e in this.events},t.tokenizer=function(e){if(!arguments.length||null===e||void 0===e)return[];if(Array.isArray(e)){var n=e.filter(function(e){return null===e||void 0===e?!1:!0});n=n.map(function(e){return t.utils.toString(e).toLowerCase()});var i=[];return n.forEach(function(e){var n=e.split(t.tokenizer.seperator);i=i.concat(n)},this),i}return e.toString().trim().toLowerCase().split(t.tokenizer.seperator)},t.tokenizer.defaultSeperator=/[\s\-]+/,t.tokenizer.seperator=t.tokenizer.defaultSeperator,t.tokenizer.setSeperator=function(e){null!==e&&void 0!==e&&"object"==typeof e&&(t.tokenizer.seperator=e)},t.tokenizer.resetSeperator=function(){t.tokenizer.seperator=t.tokenizer.defaultSeperator},t.tokenizer.getSeperator=function(){return t.tokenizer.seperator},t.Pipeline=function(){this._queue=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in t.Pipeline.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[n]=e},t.Pipeline.getRegisteredFunction=function(e){return e in t.Pipeline.registeredFunctions!=!0?null:t.Pipeline.registeredFunctions[e]},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.getRegisteredFunction(e);if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i+1,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i,0,n)},t.Pipeline.prototype.remove=function(e){var t=this._queue.indexOf(e);-1!==t&&this._queue.splice(t,1)},t.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._queue.length,o=0;n>o;o++){for(var r=e[o],s=0;i>s&&(r=this._queue[s](r,o,e),void 0!==r&&null!==r);s++);void 0!==r&&null!==r&&t.push(r)}return t},t.Pipeline.prototype.reset=function(){this._queue=[]},t.Pipeline.prototype.get=function(){return this._queue},t.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.DocumentStore,this.index={},this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},t.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;n._fields=e.fields,n._ref=e.ref,n.documentStore=t.DocumentStore.load(e.documentStore),n.pipeline=t.Pipeline.load(e.pipeline),n.index={};for(var i in e.index)n.index[i]=t.InvertedIndex.load(e.index[i]);return n},t.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new t.InvertedIndex,this},t.Index.prototype.setRef=function(e){return this._ref=e,this},t.Index.prototype.saveDocument=function(e){return this.documentStore=new t.DocumentStore(e),this},t.Index.prototype.addDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.addDoc(i,e),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));this.documentStore.addFieldLength(i,n,o.length);var r={};o.forEach(function(e){e in r?r[e]+=1:r[e]=1},this);for(var s in r){var u=r[s];u=Math.sqrt(u),this.index[n].addToken(s,{ref:i,tf:u})}},this),n&&this.eventEmitter.emit("add",e,this)}},t.Index.prototype.removeDocByRef=function(e){if(e&&this.documentStore.isDocStored()!==!1&&this.documentStore.hasDoc(e)){var t=this.documentStore.getDoc(e);this.removeDoc(t,!1)}},t.Index.prototype.removeDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.hasDoc(i)&&(this.documentStore.removeDoc(i),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));o.forEach(function(e){this.index[n].removeToken(e,i)},this)},this),n&&this.eventEmitter.emit("remove",e,this))}},t.Index.prototype.updateDoc=function(e,t){var t=void 0===t?!0:t;this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},t.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,n))return this._idfCache[n];var i=this.index[t].getDocFreq(e),o=1+Math.log(this.documentStore.length/(i+1));return this._idfCache[n]=o,o},t.Index.prototype.getFields=function(){return this._fields.slice()},t.Index.prototype.search=function(e,n){if(!e)return[];e="string"==typeof e?{any:e}:JSON.parse(JSON.stringify(e));var i=null;null!=n&&(i=JSON.stringify(n));for(var o=new t.Configuration(i,this.getFields()).get(),r={},s=Object.keys(e),u=0;u0&&t.push(e);for(var i in n)"docs"!==i&&"df"!==i&&this.expandToken(e+i,t,n[i]);return t},t.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},t.Configuration=function(e,n){var e=e||"";if(void 0==n||null==n)throw new Error("fields should not be null");this.config={};var i;try{i=JSON.parse(e),this.buildUserConfig(i,n)}catch(o){t.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(n)}},t.Configuration.prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},t.Configuration.prototype.buildUserConfig=function(e,n){var i="OR",o=!1;if(this.reset(),"bool"in e&&(i=e.bool||i),"expand"in e&&(o=e.expand||o),"fields"in e)for(var r in e.fields)if(n.indexOf(r)>-1){var s=e.fields[r],u=o;void 0!=s.expand&&(u=s.expand),this.config[r]={boost:s.boost||0===s.boost?s.boost:1,bool:s.bool||i,expand:u}}else t.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(i,o,n)},t.Configuration.prototype.addAllFields2UserConfig=function(e,t,n){n.forEach(function(n){this.config[n]={boost:1,bool:e,expand:t}},this)},t.Configuration.prototype.get=function(){return this.config},t.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){var e,t;for(e=0;e1;){if(r===e)return o;e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o]}return r===e?o:-1},lunr.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;)e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o];return r>e?o:e>r?o+1:void 0},lunr.SortedSet.prototype.intersect=function(e){for(var t=new lunr.SortedSet,n=0,i=0,o=this.length,r=e.length,s=this.elements,u=e.elements;;){if(n>o-1||i>r-1)break;s[n]!==u[i]?s[n]u[i]&&i++:(t.add(s[n]),n++,i++)}return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){var t,n,i;this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone();for(var o=0,r=n.toArray();oStreamlit dataframe display\n\n

alternative to st.table with configuration displaying Pandas DataFrame

\n\n

\"PyPI\n\"PyPI\n\"PyPI\n\"PyPI\n\"PyPI\n\"PyPI\n\"PyPI

\n\n

Installation instructions

\n\n
\n
pip install st-df-table\n
\n
\n\n

Usage instructions

\n\n
\n
import pandas as pd\nfrom st_df_table import st_table\n\ndata = {\n    "Column A": [1, 2, 3, 4, 5, 6],\n    "Column C": [True, False, True, False, True, False],\n    "Column B": ["A", "B", "C", "F", "G", "H"],\n}\n\ndf = pd.DataFrame(data)\nst_table(df)\n
\n
\n\n

\"table-1\"

\n\n
\n
st_table(\n    df,\n    head_align="left",\n    data_align="left",\n    head_bg_color="red",\n    head_color="blue",\n    head_font_weight="normal",\n    border_color="red",\n    border_width="3",\n)\n
\n
\n\n

\"table-2\"

\n\n
\n
st_table(\n    df,\n    head_align="right",\n    data_align="right",\n    data_bg_color="green",\n    data_color="yellow",\n    data_font_weight="bold",\n    bordered=False,\n    sortable=False,\n)\n
\n
\n\n

\"table-3\"

\n\n
\n
import string\nimport numpy as np\nimport pandas as pd\nfrom st_df_table import st_table\n\ndf = pd.DataFrame(\n    {\n        "Column A": list(range(1, 101)),\n        "Column B": np.random.choice(list(string.ascii_uppercase), size=100),\n        "Column C": np.random.rand(100),\n    }\n)\n\nst_table(\n    df,\n    border_width=4,\n    border_color="red",\n    paginated=True,\n    pagination_size_per_page=7,\n    pagination_bar_size=4,\n    pagination_text_color="blue",\n    pagination_bg_color="yellow",\n    pagination_border_color="green",\n    pagination_active_color="yellow",\n)\n
\n
\n\n

\"table-4\"

\n\n

Changelog

\n\n

All notable changes to this project will be documented in this file.

\n\n

The format is based on Keep a Changelog,\nand this project adheres to Semantic Versioning.

\n\n

[0.0.5] - 2024-10-26

\n\n

Added

\n\n
    \n
  • configurable pagination
  • \n
\n\n

[0.0.4] - 2024-10-25

\n\n

Added

\n\n
    \n
  • font and font size
  • \n
\n\n

[0.0.3] - 2024-10-25

\n\n

Changed

\n\n
    \n
  • removed dependency to bootstrap.min.css
  • \n
\n\n

[0.0.2] - 2024-10-25

\n\n

Fixed

\n\n
    \n
  • build
  • \n
\n\n

[0.0.1] - 2024-10-25 - deleted

\n\n

Added

\n\n
    \n
  • initial version
  • \n
\n"}, "st_df_table.st_table": {"fullname": "st_df_table.st_table", "modulename": "st_df_table", "qualname": "st_table", "kind": "function", "doc": "

Displays Pandas DataFrame

\n\n
Parameters
\n\n
    \n
  • df: pd.DataFrame
  • \n
  • head_align: str - aligning table header, values are: \"center\", \"left\", \"right\"
  • \n
  • data_align: str - align table data, values are: \"center\", \"left\", \"right\"
  • \n
  • head_bg_color: str - table header background color
  • \n
  • data_bg_color: str - table data background color
  • \n
  • head_color: str - table header text color
  • \n
  • data_color: str - table data text color
  • \n
  • head_font_weight: str - table header font weight
  • \n
  • data_font_weight: str - table data font weight
  • \n
  • bordered: bool - table bordered
  • \n
  • border_color: str - table border color
  • \n
  • border_width: int - table border width in pixels
  • \n
  • table_width: int - table width in pixels
  • \n
  • sortable: bool - table columns sortable
  • \n
  • font: str - table font name
  • \n
  • font_size: int - table font size in pixels
  • \n
  • paginated: bool - table paginated - if this is False all below pagination parameters are disregarded
  • \n
  • pagination_size_per_page: int - number of records per page
  • \n
  • pagination_bar_size: int - pagination bar size
  • \n
  • pagination_text_color: str - text color of pagination bar
  • \n
  • pagination_bg_color: str - background color of pagination bar
  • \n
  • pagination_border_color: str - border color of pagination bar
  • \n
  • pagination_active_color: str - active text color of pagination bar
  • \n
  • pagination_active_border_color: str - active border color of pagination bar
  • \n
  • pagination_active_bg_color: str - active background color of pagination bar
  • \n
  • pagination_hover_color: str - hover text color of pagination bar
  • \n
  • pagination_hover_bg_color: str - hover background color of pagination bar
  • \n
  • key: str\nAn optional key that uniquely identifies this component. If this is\nNone, and the component's arguments are changed, the component will\nbe re-mounted in the Streamlit frontend and lose its current state.
  • \n
\n\n
Returns
\n\n
\n

none

\n
\n", "signature": "(\tdf: pandas.core.frame.DataFrame,\thead_align: str = 'center',\tdata_align: str = 'left',\thead_bg_color: str = 'white',\tdata_bg_color: str = 'white',\thead_color: str = 'black',\tdata_color: str = 'black',\thead_font_weight: str = 'bold',\tdata_font_weight: str = 'normal',\tbordered: bool = True,\tborder_color: str = 'black',\tborder_width: int = 1,\ttable_width: int = None,\tsortable: bool = True,\tfont: str = 'Arial',\tfont_size: int = 16,\tpaginated: bool = False,\tpagination_size_per_page: int = 10,\tpagination_bar_size: int = 5,\tpagination_text_color: str = 'black',\tpagination_bg_color: str = 'white',\tpagination_border_color: str = 'black',\tpagination_active_color: str = 'white',\tpagination_active_border_color: str = 'black',\tpagination_active_bg_color: str = 'gray',\tpagination_hover_color: str = 'white',\tpagination_hover_bg_color: str = 'gray',\tkey=None):", "funcdef": "def"}}, "docInfo": {"st_df_table": {"qualname": 0, "fullname": 3, "annotation": 0, "default_value": 0, "signature": 0, "bases": 0, "doc": 1098}, "st_df_table.st_table": {"qualname": 2, "fullname": 5, "annotation": 0, "default_value": 0, "signature": 623, "bases": 0, "doc": 400}}, "length": 2, "save": true}, "index": {"qualname": {"root": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}}, "fullname": {"root": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 2}}, "d": {"docs": {}, "df": 0, "f": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1}}, "df": 2}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 2}}}}}}}, "annotation": {"root": {"docs": {}, "df": 0}}, "default_value": {"root": {"docs": {}, "df": 0}}, "signature": {"root": {"1": {"0": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}, "6": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}, "docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}, "3": {"9": {"docs": {"st_df_table.st_table": {"tf": 6}}, "df": 1}, "docs": {}, "df": 0}, "5": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}, "docs": {"st_df_table.st_table": {"tf": 21.494185260204677}}, "df": 1, "d": {"docs": {}, "df": 0, "f": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"st_df_table.st_table": {"tf": 2}}, "df": 1, "f": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"st_df_table.st_table": {"tf": 3.1622776601683795}}, "df": 1}}}}}}}, "e": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table.st_table": {"tf": 3.605551275463989}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}, "f": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table.st_table": {"tf": 2}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table.st_table": {"tf": 2}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1.7320508075688772}}, "df": 1}}}}}}, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table.st_table": {"tf": 4.242640687119285}}, "df": 1}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1.7320508075688772}}, "df": 1}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}, "b": {"docs": {}, "df": 0, "g": {"docs": {"st_df_table.st_table": {"tf": 2.23606797749979}}, "df": 1}, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "k": {"docs": {"st_df_table.st_table": {"tf": 2.449489742783178}}, "df": 1}}}}, "o": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table.st_table": {"tf": 2}}, "df": 1, "e": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "l": {"docs": {"st_df_table.st_table": {"tf": 1.7320508075688772}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}, "w": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 2.23606797749979}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}, "n": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 1}}}}, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table.st_table": {"tf": 2.23606797749979}}, "df": 1}}}, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {"st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 1}}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "y": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}, "bases": {"root": {"docs": {}, "df": 0}}, "doc": {"root": {"0": {"docs": {"st_df_table": {"tf": 3.1622776601683795}}, "df": 1}, "1": {"0": {"0": {"docs": {"st_df_table": {"tf": 1.4142135623730951}}, "df": 1}, "1": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}, "docs": {"st_df_table": {"tf": 2.23606797749979}}, "df": 1}, "docs": {"st_df_table": {"tf": 1.7320508075688772}}, "df": 1}, "2": {"0": {"2": {"4": {"docs": {"st_df_table": {"tf": 2.23606797749979}}, "df": 1}, "docs": {}, "df": 0}, "docs": {}, "df": 0}, "5": {"docs": {"st_df_table": {"tf": 2}}, "df": 1}, "6": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}, "docs": {"st_df_table": {"tf": 1.4142135623730951}}, "df": 1}, "3": {"docs": {"st_df_table": {"tf": 1.7320508075688772}}, "df": 1}, "4": {"docs": {"st_df_table": {"tf": 2}}, "df": 1}, "5": {"docs": {"st_df_table": {"tf": 1.4142135623730951}}, "df": 1}, "6": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}, "7": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}, "docs": {"st_df_table": {"tf": 27.712812921102035}, "st_df_table.st_table": {"tf": 11.532562594670797}}, "df": 2, "s": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1, "t": {"docs": {"st_df_table": {"tf": 3.1622776601683795}}, "df": 1, "r": {"docs": {"st_df_table.st_table": {"tf": 4.358898943540674}}, "df": 1, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1}}, "df": 2}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"st_df_table": {"tf": 1.4142135623730951}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 2}}}}}}}, "i": {"docs": {}, "df": 0, "z": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 2}, "st_df_table.st_table": {"tf": 2.23606797749979}}, "df": 2}}}, "e": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}}}}, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {"st_df_table": {"tf": 2.6457513110645907}, "st_df_table.st_table": {"tf": 2.8284271247461903}}, "df": 2, "f": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 2}, "st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 2}}}}}}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "y": {"docs": {"st_df_table": {"tf": 1}}, "df": 1, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}, "s": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}}}}}, "f": {"docs": {"st_df_table": {"tf": 3}, "st_df_table.st_table": {"tf": 1}}, "df": 2}, "o": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}}}}}, "e": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "y": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}}}, "a": {"docs": {"st_df_table": {"tf": 2}}, "df": 1, "l": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}}}}}, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "n": {"docs": {"st_df_table": {"tf": 2}, "st_df_table.st_table": {"tf": 1.7320508075688772}}, "df": 2, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}, "l": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1}}, "df": 2}}, "s": {"docs": {"st_df_table": {"tf": 1.7320508075688772}}, "df": 1, "c": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "i": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 2.449489742783178}}, "df": 2}}}}}, "n": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1, "d": {"docs": {"st_df_table": {"tf": 1.4142135623730951}, "st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 2}}, "d": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table": {"tf": 1.7320508075688772}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 2}}, "df": 1}, "g": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}}}}, "t": {"docs": {}, "df": 0, "o": {"docs": {"st_df_table": {"tf": 2}}, "df": 1}, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 3.1622776601683795}, "st_df_table.st_table": {"tf": 4.123105625617661}}, "df": 2}}}}, "r": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 2}}, "df": 1}}}, "e": {"docs": {}, "df": 0, "x": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 2.449489742783178}}, "df": 2}}}, "h": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "s": {"docs": {"st_df_table": {"tf": 1.7320508075688772}, "st_df_table.st_table": {"tf": 1.7320508075688772}}, "df": 2}}, "e": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1.7320508075688772}}, "df": 2}, "a": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}, "w": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}, "d": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "h": {"docs": {"st_df_table": {"tf": 1.4142135623730951}, "st_df_table.st_table": {"tf": 2}}, "df": 2}}}, "l": {"docs": {}, "df": 0, "l": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1}}, "df": 2}}}, "e": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table": {"tf": 1.4142135623730951}, "st_df_table.st_table": {"tf": 2}}, "df": 2}}}}}}, "c": {"docs": {"st_df_table": {"tf": 1.7320508075688772}}, "df": 1, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}}}}}}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "n": {"docs": {"st_df_table": {"tf": 2.449489742783178}}, "df": 1, "s": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table": {"tf": 3.1622776601683795}, "st_df_table.st_table": {"tf": 5.0990195135927845}}, "df": 2}}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table.st_table": {"tf": 1.7320508075688772}}, "df": 1}}}}}}}}, "h": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "g": {"docs": {"st_df_table": {"tf": 1.4142135623730951}}, "df": 1}}}, "s": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}, "d": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1}}, "df": 2}}}}}}, "s": {"docs": {}, "df": 0, "s": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}}, "p": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {"st_df_table": {"tf": 1.7320508075688772}, "st_df_table.st_table": {"tf": 1}}, "df": 2}}}}, "g": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 2}}, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"st_df_table": {"tf": 2.6457513110645907}, "st_df_table.st_table": {"tf": 4.47213595499958}}, "df": 2}}}}}}}, "e": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 2}}, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {"st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}}, "i": {"docs": {}, "df": 0, "p": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}, "x": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "s": {"docs": {"st_df_table.st_table": {"tf": 1.7320508075688772}}, "df": 1}}}}}, "d": {"docs": {"st_df_table": {"tf": 2}, "st_df_table.st_table": {"tf": 1}}, "df": 2}, "e": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 2}}, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "j": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}, "i": {"docs": {}, "df": 0, "n": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 2}}, "df": 2, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {"st_df_table": {"tf": 1}}, "df": 1, "a": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}}}}, "r": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"st_df_table": {"tf": 1.4142135623730951}}, "df": 1}}}}}}}}}}, "i": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}, "t": {"docs": {"st_df_table.st_table": {"tf": 2.23606797749979}}, "df": 1}}, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table": {"tf": 2.449489742783178}}, "df": 1}}}}}, "s": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 2}, "f": {"docs": {"st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 1}, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}}}}, "t": {"docs": {}, "df": 0, "s": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}, "u": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}, "p": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "c": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}}}}, "n": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "y": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}}}, "f": {"docs": {"st_df_table": {"tf": 1}}, "df": 1, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "m": {"docs": {"st_df_table": {"tf": 1.4142135623730951}}, "df": 1}, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 2.23606797749979}, "st_df_table.st_table": {"tf": 1}}, "df": 2}}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table": {"tf": 2}, "st_df_table.st_table": {"tf": 2.8284271247461903}}, "df": 2}}, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}, "x": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}, "q": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table": {"tf": 7.615773105863909}}, "df": 1}}}}, "b": {"docs": {"st_df_table": {"tf": 1.7320508075688772}}, "df": 1, "g": {"docs": {"st_df_table": {"tf": 1.7320508075688772}, "st_df_table.st_table": {"tf": 2.23606797749979}}, "df": 2}, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 1.4142135623730951}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table": {"tf": 2.23606797749979}, "st_df_table.st_table": {"tf": 2.8284271247461903}}, "df": 2, "e": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 2}}}}}}, "l": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}, "o": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "p": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}}, "l": {"docs": {"st_df_table.st_table": {"tf": 1.7320508075688772}}, "df": 1}}}, "a": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 3.1622776601683795}}, "df": 2}, "s": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}, "c": {"docs": {}, "df": 0, "k": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table.st_table": {"tf": 2.23606797749979}}, "df": 1}}}}}}}}}, "e": {"docs": {"st_df_table": {"tf": 1}, "st_df_table.st_table": {"tf": 1}}, "df": 2, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}, "u": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}, "g": {"docs": {"st_df_table": {"tf": 1}}, "df": 1, "r": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "n": {"docs": {"st_df_table": {"tf": 1.4142135623730951}}, "df": 1}}}}}, "h": {"docs": {"st_df_table": {"tf": 1}}, "df": 1, "e": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table": {"tf": 2.23606797749979}, "st_df_table.st_table": {"tf": 2}}, "df": 2, "e": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table.st_table": {"tf": 2}}, "df": 1}}}}}, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table.st_table": {"tf": 2}}, "df": 1}}}}}, "l": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "f": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table": {"tf": 1.4142135623730951}, "st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 2}}}, "i": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table": {"tf": 1.4142135623730951}}, "df": 1}}}, "o": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}, "r": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1, "d": {"docs": {"st_df_table": {"tf": 1.7320508075688772}}, "df": 1}, "m": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}, "c": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "d": {"docs": {}, "df": 0, "s": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}, "t": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "s": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}, "i": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "h": {"docs": {}, "df": 0, "t": {"docs": {"st_df_table": {"tf": 1.4142135623730951}, "st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 2}}}}, "a": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}, "d": {"docs": {"st_df_table": {"tf": 1}}, "df": 1, "o": {"docs": {}, "df": 0, "m": {"docs": {"st_df_table": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "n": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}, "t": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "b": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}, "n": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 1}}}, "u": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "p": {"docs": {}, "df": 0, "y": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}, "b": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}, "p": {"docs": {"st_df_table": {"tf": 1.7320508075688772}}, "df": 1}, "a": {"docs": {}, "df": 0, "m": {"docs": {}, "df": 0, "e": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}, "y": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "w": {"docs": {"st_df_table": {"tf": 1.7320508075688772}}, "df": 1}}}}}}, "o": {"docs": {}, "df": 0, "n": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}, "f": {"docs": {"st_df_table.st_table": {"tf": 3}}, "df": 1}, "p": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "a": {"docs": {}, "df": 0, "l": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}}}, "k": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "p": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}, "y": {"docs": {"st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 1}}}, "v": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "r": {"docs": {}, "df": 0, "s": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "o": {"docs": {}, "df": 0, "n": {"docs": {"st_df_table": {"tf": 1}}, "df": 1, "i": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "g": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}}}}}}}}, "a": {"docs": {}, "df": 0, "l": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "s": {"docs": {"st_df_table.st_table": {"tf": 1.4142135623730951}}, "df": 1}}}}}}, "m": {"docs": {}, "df": 0, "i": {"docs": {}, "df": 0, "n": {"docs": {"st_df_table": {"tf": 1}}, "df": 1}}, "o": {"docs": {}, "df": 0, "u": {"docs": {}, "df": 0, "n": {"docs": {}, "df": 0, "t": {"docs": {}, "df": 0, "e": {"docs": {}, "df": 0, "d": {"docs": {"st_df_table.st_table": {"tf": 1}}, "df": 1}}}}}}}}}}, "pipeline": ["trimmer"], "_isPrebuiltIndex": true}; + + // mirrored in build-search-index.js (part 1) + // Also split on html tags. this is a cheap heuristic, but good enough. + elasticlunr.tokenizer.setSeperator(/[\s\-.;&_'"=,()]+|<[^>]*>/); + + let searchIndex; + if (docs._isPrebuiltIndex) { + console.info("using precompiled search index"); + searchIndex = elasticlunr.Index.load(docs); + } else { + console.time("building search index"); + // mirrored in build-search-index.js (part 2) + searchIndex = elasticlunr(function () { + this.pipeline.remove(elasticlunr.stemmer); + this.pipeline.remove(elasticlunr.stopWordFilter); + this.addField("qualname"); + this.addField("fullname"); + this.addField("annotation"); + this.addField("default_value"); + this.addField("signature"); + this.addField("bases"); + this.addField("doc"); + this.setRef("fullname"); + }); + for (let doc of docs) { + searchIndex.addDoc(doc); + } + console.timeEnd("building search index"); + } + + return (term) => searchIndex.search(term, { + fields: { + qualname: {boost: 4}, + fullname: {boost: 2}, + annotation: {boost: 2}, + default_value: {boost: 2}, + signature: {boost: 2}, + bases: {boost: 2}, + doc: {boost: 1}, + }, + expand: true + }); +})(); \ No newline at end of file diff --git a/st_df_table/st_df_table.html b/st_df_table/st_df_table.html new file mode 100644 index 0000000..d44fbef --- /dev/null +++ b/st_df_table/st_df_table.html @@ -0,0 +1,511 @@ + + + + + + + st_df_table API documentation + + + + + + + + + +
+
+

+st_df_table

+ +

Streamlit dataframe display

+ +

alternative to st.table with configuration displaying Pandas DataFrame

+ +

PyPI - Version +PyPI - License +PyPI - Downloads +PyPI - Implementation +PyPI - Wheel +PyPI - Format +PyPI - Python Version

+ +

Installation instructions

+ +
+
pip install st-df-table
+
+
+ +

Usage instructions

+ +
+
import pandas as pd
+from st_df_table import st_table
+
+data = {
+    "Column A": [1, 2, 3, 4, 5, 6],
+    "Column C": [True, False, True, False, True, False],
+    "Column B": ["A", "B", "C", "F", "G", "H"],
+}
+
+df = pd.DataFrame(data)
+st_table(df)
+
+
+ +

table-1

+ +
+
st_table(
+    df,
+    head_align="left",
+    data_align="left",
+    head_bg_color="red",
+    head_color="blue",
+    head_font_weight="normal",
+    border_color="red",
+    border_width="3",
+)
+
+
+ +

table-2

+ +
+
st_table(
+    df,
+    head_align="right",
+    data_align="right",
+    data_bg_color="green",
+    data_color="yellow",
+    data_font_weight="bold",
+    bordered=False,
+    sortable=False,
+)
+
+
+ +

table-3

+ +
+
import string
+import numpy as np
+import pandas as pd
+from st_df_table import st_table
+
+df = pd.DataFrame(
+    {
+        "Column A": list(range(1, 101)),
+        "Column B": np.random.choice(list(string.ascii_uppercase), size=100),
+        "Column C": np.random.rand(100),
+    }
+)
+
+st_table(
+    df,
+    border_width=4,
+    border_color="red",
+    paginated=True,
+    pagination_size_per_page=7,
+    pagination_bar_size=4,
+    pagination_text_color="blue",
+    pagination_bg_color="yellow",
+    pagination_border_color="green",
+    pagination_active_color="yellow",
+)
+
+
+ +

table-4

+ +

Changelog

+ +

All notable changes to this project will be documented in this file.

+ +

The format is based on Keep a Changelog, +and this project adheres to Semantic Versioning.

+ +

[0.0.5] - 2024-10-26

+ +

Added

+ +
    +
  • configurable pagination
  • +
+ +

[0.0.4] - 2024-10-25

+ +

Added

+ +
    +
  • font and font size
  • +
+ +

[0.0.3] - 2024-10-25

+ +

Changed

+ +
    +
  • removed dependency to bootstrap.min.css
  • +
+ +

[0.0.2] - 2024-10-25

+ +

Fixed

+ +
    +
  • build
  • +
+ +

[0.0.1] - 2024-10-25 - deleted

+ +

Added

+ +
    +
  • initial version
  • +
+
+ + + + + +
  1"""
+  2    .. include:: ../README.md
+  3    .. include:: ../CHANGELOG.md
+  4"""
+  5
+  6import os
+  7
+  8import pandas as pd
+  9import streamlit.components.v1 as components
+ 10
+ 11_RELEASE = True
+ 12
+ 13if os.getenv("_ST_TABLE_NOT_RELEASE_"):
+ 14    _RELEASE = False
+ 15
+ 16if not _RELEASE:
+ 17    _component_func = components.declare_component(
+ 18        "st_table",
+ 19        url="http://localhost:3001",
+ 20    )
+ 21else:
+ 22    parent_dir = os.path.dirname(os.path.abspath(__file__))
+ 23    build_dir = os.path.join(parent_dir, "frontend/build")
+ 24    _component_func = components.declare_component("st_table", path=build_dir)
+ 25
+ 26
+ 27def st_table(
+ 28    df: pd.DataFrame,
+ 29    head_align: str = "center",
+ 30    data_align: str = "left",
+ 31    head_bg_color: str = "white",
+ 32    data_bg_color: str = "white",
+ 33    head_color: str = "black",
+ 34    data_color: str = "black",
+ 35    head_font_weight: str = "bold",
+ 36    data_font_weight: str = "normal",
+ 37    bordered: bool = True,
+ 38    border_color: str = "black",
+ 39    border_width: int = 1,
+ 40    table_width: int = None,
+ 41    sortable: bool = True,
+ 42    font: str = "Arial",
+ 43    font_size: int = 16,
+ 44    paginated: bool = False,
+ 45    pagination_size_per_page: int = 10,
+ 46    pagination_bar_size: int = 5,
+ 47    pagination_text_color: str = "black",
+ 48    pagination_bg_color: str = "white",
+ 49    pagination_border_color: str = "black",
+ 50    pagination_active_color: str = "white",
+ 51    pagination_active_border_color: str = "black",
+ 52    pagination_active_bg_color: str = "gray",
+ 53    pagination_hover_color: str = "white",
+ 54    pagination_hover_bg_color: str = "gray",
+ 55    key=None,
+ 56):
+ 57    """Displays Pandas DataFrame
+ 58
+ 59    :param df: pd.DataFrame
+ 60    :param head_align: str - aligning table header, values are: "center", "left", "right"
+ 61    :param data_align: str - align table data, values are: "center", "left", "right"
+ 62    :param head_bg_color: str - table header background color
+ 63    :param data_bg_color: str - table data background color
+ 64    :param head_color: str - table header text color
+ 65    :param data_color: str - table data text color
+ 66    :param head_font_weight: str - table header font weight
+ 67    :param data_font_weight: str - table data font weight
+ 68    :param bordered: bool - table bordered
+ 69    :param border_color: str - table border color
+ 70    :param border_width: int - table border width in pixels
+ 71    :param table_width: int - table width in pixels
+ 72    :param sortable: bool - table columns sortable
+ 73    :param font: str - table font name
+ 74    :param font_size: int - table font size in pixels
+ 75    :param paginated: bool - table paginated - **if this is False all below pagination parameters are disregarded**
+ 76    :param pagination_size_per_page: int - number of records per page
+ 77    :param pagination_bar_size: int - pagination bar size
+ 78    :param pagination_text_color: str - text color of pagination bar
+ 79    :param pagination_bg_color: str - background color of pagination bar
+ 80    :param pagination_border_color: str - border color of pagination bar
+ 81    :param pagination_active_color: str - active text color of pagination bar
+ 82    :param pagination_active_border_color: str - active border color of pagination bar
+ 83    :param pagination_active_bg_color: str - active background color of pagination bar
+ 84    :param pagination_hover_color: str - hover text color of pagination bar
+ 85    :param pagination_hover_bg_color: str - hover background color of pagination bar
+ 86    :param key: str
+ 87            An optional key that uniquely identifies this component. If this is
+ 88            None, and the component's arguments are changed, the component will
+ 89            be re-mounted in the Streamlit frontend and lose its current state.
+ 90
+ 91    :return: none
+ 92
+ 93    """
+ 94    columns = [{"dataField": col, "text": col, "sort": sortable} for col in df.columns]
+ 95    data = df.reset_index().to_dict(orient="records")
+ 96    _component_func(
+ 97        columns=columns,
+ 98        data=data,
+ 99        head_align=head_align,
+100        data_align=data_align,
+101        head_bg_color=head_bg_color,
+102        data_bg_color=data_bg_color,
+103        head_color=head_color,
+104        data_color=data_color,
+105        head_font_weight=head_font_weight,
+106        data_font_weight=data_font_weight,
+107        bordered=bordered,
+108        border_color=border_color,
+109        border_width=border_width,
+110        table_width=table_width,
+111        sortable=sortable,
+112        font=font,
+113        font_size=font_size,
+114        paginated=paginated,
+115        pagination_size_per_page=pagination_size_per_page,
+116        pagination_bar_size=pagination_bar_size,
+117        pagination_text_color=pagination_text_color,
+118        pagination_bg_color=pagination_bg_color,
+119        pagination_border_color=pagination_border_color,
+120        pagination_active_color=pagination_active_color,
+121        pagination_active_border_color=pagination_active_border_color,
+122        pagination_active_bg_color=pagination_active_bg_color,
+123        pagination_hover_color=pagination_hover_color,
+124        pagination_hover_bg_color=pagination_hover_bg_color,
+125        key=key,
+126    )
+
+ + +
+
+ +
+ + def + st_table( df: pandas.core.frame.DataFrame, head_align: str = 'center', data_align: str = 'left', head_bg_color: str = 'white', data_bg_color: str = 'white', head_color: str = 'black', data_color: str = 'black', head_font_weight: str = 'bold', data_font_weight: str = 'normal', bordered: bool = True, border_color: str = 'black', border_width: int = 1, table_width: int = None, sortable: bool = True, font: str = 'Arial', font_size: int = 16, paginated: bool = False, pagination_size_per_page: int = 10, pagination_bar_size: int = 5, pagination_text_color: str = 'black', pagination_bg_color: str = 'white', pagination_border_color: str = 'black', pagination_active_color: str = 'white', pagination_active_border_color: str = 'black', pagination_active_bg_color: str = 'gray', pagination_hover_color: str = 'white', pagination_hover_bg_color: str = 'gray', key=None): + + + +
+ +
 28def st_table(
+ 29    df: pd.DataFrame,
+ 30    head_align: str = "center",
+ 31    data_align: str = "left",
+ 32    head_bg_color: str = "white",
+ 33    data_bg_color: str = "white",
+ 34    head_color: str = "black",
+ 35    data_color: str = "black",
+ 36    head_font_weight: str = "bold",
+ 37    data_font_weight: str = "normal",
+ 38    bordered: bool = True,
+ 39    border_color: str = "black",
+ 40    border_width: int = 1,
+ 41    table_width: int = None,
+ 42    sortable: bool = True,
+ 43    font: str = "Arial",
+ 44    font_size: int = 16,
+ 45    paginated: bool = False,
+ 46    pagination_size_per_page: int = 10,
+ 47    pagination_bar_size: int = 5,
+ 48    pagination_text_color: str = "black",
+ 49    pagination_bg_color: str = "white",
+ 50    pagination_border_color: str = "black",
+ 51    pagination_active_color: str = "white",
+ 52    pagination_active_border_color: str = "black",
+ 53    pagination_active_bg_color: str = "gray",
+ 54    pagination_hover_color: str = "white",
+ 55    pagination_hover_bg_color: str = "gray",
+ 56    key=None,
+ 57):
+ 58    """Displays Pandas DataFrame
+ 59
+ 60    :param df: pd.DataFrame
+ 61    :param head_align: str - aligning table header, values are: "center", "left", "right"
+ 62    :param data_align: str - align table data, values are: "center", "left", "right"
+ 63    :param head_bg_color: str - table header background color
+ 64    :param data_bg_color: str - table data background color
+ 65    :param head_color: str - table header text color
+ 66    :param data_color: str - table data text color
+ 67    :param head_font_weight: str - table header font weight
+ 68    :param data_font_weight: str - table data font weight
+ 69    :param bordered: bool - table bordered
+ 70    :param border_color: str - table border color
+ 71    :param border_width: int - table border width in pixels
+ 72    :param table_width: int - table width in pixels
+ 73    :param sortable: bool - table columns sortable
+ 74    :param font: str - table font name
+ 75    :param font_size: int - table font size in pixels
+ 76    :param paginated: bool - table paginated - **if this is False all below pagination parameters are disregarded**
+ 77    :param pagination_size_per_page: int - number of records per page
+ 78    :param pagination_bar_size: int - pagination bar size
+ 79    :param pagination_text_color: str - text color of pagination bar
+ 80    :param pagination_bg_color: str - background color of pagination bar
+ 81    :param pagination_border_color: str - border color of pagination bar
+ 82    :param pagination_active_color: str - active text color of pagination bar
+ 83    :param pagination_active_border_color: str - active border color of pagination bar
+ 84    :param pagination_active_bg_color: str - active background color of pagination bar
+ 85    :param pagination_hover_color: str - hover text color of pagination bar
+ 86    :param pagination_hover_bg_color: str - hover background color of pagination bar
+ 87    :param key: str
+ 88            An optional key that uniquely identifies this component. If this is
+ 89            None, and the component's arguments are changed, the component will
+ 90            be re-mounted in the Streamlit frontend and lose its current state.
+ 91
+ 92    :return: none
+ 93
+ 94    """
+ 95    columns = [{"dataField": col, "text": col, "sort": sortable} for col in df.columns]
+ 96    data = df.reset_index().to_dict(orient="records")
+ 97    _component_func(
+ 98        columns=columns,
+ 99        data=data,
+100        head_align=head_align,
+101        data_align=data_align,
+102        head_bg_color=head_bg_color,
+103        data_bg_color=data_bg_color,
+104        head_color=head_color,
+105        data_color=data_color,
+106        head_font_weight=head_font_weight,
+107        data_font_weight=data_font_weight,
+108        bordered=bordered,
+109        border_color=border_color,
+110        border_width=border_width,
+111        table_width=table_width,
+112        sortable=sortable,
+113        font=font,
+114        font_size=font_size,
+115        paginated=paginated,
+116        pagination_size_per_page=pagination_size_per_page,
+117        pagination_bar_size=pagination_bar_size,
+118        pagination_text_color=pagination_text_color,
+119        pagination_bg_color=pagination_bg_color,
+120        pagination_border_color=pagination_border_color,
+121        pagination_active_color=pagination_active_color,
+122        pagination_active_border_color=pagination_active_border_color,
+123        pagination_active_bg_color=pagination_active_bg_color,
+124        pagination_hover_color=pagination_hover_color,
+125        pagination_hover_bg_color=pagination_hover_bg_color,
+126        key=key,
+127    )
+
+ + +

Displays Pandas DataFrame

+ +
Parameters
+ +
    +
  • df: pd.DataFrame
  • +
  • head_align: str - aligning table header, values are: "center", "left", "right"
  • +
  • data_align: str - align table data, values are: "center", "left", "right"
  • +
  • head_bg_color: str - table header background color
  • +
  • data_bg_color: str - table data background color
  • +
  • head_color: str - table header text color
  • +
  • data_color: str - table data text color
  • +
  • head_font_weight: str - table header font weight
  • +
  • data_font_weight: str - table data font weight
  • +
  • bordered: bool - table bordered
  • +
  • border_color: str - table border color
  • +
  • border_width: int - table border width in pixels
  • +
  • table_width: int - table width in pixels
  • +
  • sortable: bool - table columns sortable
  • +
  • font: str - table font name
  • +
  • font_size: int - table font size in pixels
  • +
  • paginated: bool - table paginated - if this is False all below pagination parameters are disregarded
  • +
  • pagination_size_per_page: int - number of records per page
  • +
  • pagination_bar_size: int - pagination bar size
  • +
  • pagination_text_color: str - text color of pagination bar
  • +
  • pagination_bg_color: str - background color of pagination bar
  • +
  • pagination_border_color: str - border color of pagination bar
  • +
  • pagination_active_color: str - active text color of pagination bar
  • +
  • pagination_active_border_color: str - active border color of pagination bar
  • +
  • pagination_active_bg_color: str - active background color of pagination bar
  • +
  • pagination_hover_color: str - hover text color of pagination bar
  • +
  • pagination_hover_bg_color: str - hover background color of pagination bar
  • +
  • key: str +An optional key that uniquely identifies this component. If this is +None, and the component's arguments are changed, the component will +be re-mounted in the Streamlit frontend and lose its current state.
  • +
+ +
Returns
+ +
+

none

+
+
+ + +
+
+ + \ No newline at end of file diff --git a/st_df_table/st_df_table/example.html b/st_df_table/st_df_table/example.html new file mode 100644 index 0000000..2cb5366 --- /dev/null +++ b/st_df_table/st_df_table/example.html @@ -0,0 +1,381 @@ + + + + + + + st_df_table.example API documentation + + + + + + + + + +
+
+

+st_df_table.example

+ + + + + + +
 1import string
+ 2from importlib.metadata import version
+ 3
+ 4import numpy as np
+ 5import pandas as pd
+ 6import streamlit as st
+ 7
+ 8from st_df_table import st_table
+ 9
+10st.set_page_config(layout="wide", page_title="st_df_table.st_table")
+11
+12data = {
+13    "Column A": [1, 2, 3, 4, 5, 6],
+14    "Column B": ["A", "B", "C", "F", "G", "H"],
+15    "Column C": [True, False, True, False, True, False],
+16}
+17
+18df = pd.DataFrame(data)
+19
+20st.title(f"st_df_table.st_table ({version('st_df_table')}) - custom DataFrame display")
+21st.subheader("Default")
+22st_table(df)
+23st.subheader("Align left, head color, head text color, head font weight 'normal'")
+24st_table(
+25    df,
+26    head_align="left",
+27    data_align="left",
+28    head_bg_color="red",
+29    head_color="blue",
+30    head_font_weight="normal",
+31    border_color="red",
+32    border_width=3,
+33    key="left",
+34)
+35st.subheader(
+36    "Align right, data color, data text color, data font weight 'bold', no border, columns not 'sortable', table width"
+37)
+38
+39data = {
+40    "Column A": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
+41    "Column C": [True, False, True, False, True, False, False, True, False, True],
+42    "Column B": ["A", "B", "C", "F", "G", "H", "I", "J", "K", "L"],
+43}
+44
+45df = pd.DataFrame(data)
+46
+47st_table(
+48    df,
+49    head_align="right",
+50    data_align="right",
+51    data_bg_color="green",
+52    data_color="yellow",
+53    data_font_weight="bold",
+54    bordered=False,
+55    sortable=False,
+56    table_width=500,
+57    key="right",
+58)
+59
+60st.subheader("Align left, head color, head text color, head font weight 'normal'")
+61st_table(
+62    df,
+63    head_align="left",
+64    data_align="left",
+65    head_bg_color="red",
+66    head_color="blue",
+67    head_font_weight="normal",
+68    border_color="red",
+69    border_width=3,
+70    font="monospace",
+71    font_size=14,
+72    key="left2",
+73)
+74
+75st.subheader("Pagination")
+76df = pd.DataFrame(
+77    {
+78        "Column A": list(range(1, 101)),
+79        "Column B": np.random.choice(list(string.ascii_uppercase), size=100),
+80        "Column C": np.random.rand(100),
+81    }
+82)
+83
+84st_table(
+85    df,
+86    border_width=4,
+87    border_color="red",
+88    paginated=True,
+89    pagination_size_per_page=7,
+90    pagination_bar_size=4,
+91    pagination_text_color="blue",
+92    pagination_bg_color="yellow",
+93    pagination_border_color="green",
+94    pagination_active_color="yellow",
+95)
+
+ + +
+
+
+ data = + + {'Column A': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 'Column C': [True, False, True, False, True, False, False, True, False, True], 'Column B': ['A', 'B', 'C', 'F', 'G', 'H', 'I', 'J', 'K', 'L']} + + +
+ + + + +
+
+
+ df = + + Column A Column B Column C +0 1 K 0.852814 +1 2 C 0.167776 +2 3 S 0.178705 +3 4 Y 0.139031 +4 5 L 0.297358 +.. ... ... ... +95 96 I 0.335499 +96 97 Z 0.999081 +97 98 V 0.906377 +98 99 Z 0.497572 +99 100 H 0.473720 + +[100 rows x 3 columns] + + +
+ + + + +
+
+ + \ No newline at end of file