Skip to content

Table with many features for Streamlit. This component use Bootstrap and FontAwesome. Created by caiodearaujo

License

Notifications You must be signed in to change notification settings

chaseelliottpatterson/streamlit-awesome-table

 
 

Repository files navigation

Awesome Table for Streamlit


Awesome table is a component to use with (Streamlit)[https://github.com/streamlit/streamlit] with order and search components.

Installing AwesomeTable using PiP

pip install streamlit-awesome-table

Examples

Create a simple table

View complete source here

import pandas as pd
from awesome_table import AwesomeTable

sample_data = {...}

AwesomeTable(pd.json_normalize(sample_data))

Simple Table w/ AwesomeTable

Create a table with columns

View complete source here

import pandas as pd
from awesome_table import AwesomeTable
from awesome_table.columns import Column

sample_data = {...}

AwesomeTable(pd.json_normalize(sample_data), columns=[
    Column(name='id', label='ID'),
    Column(name='name', label='Name'),
    Column(name='job_title', label='Job Title'),
    Column(name='avatar', label='Avatar'),
    Column(name='_url.social_media', label='Social Media'),
    Column(name='_url.document', label='Document'),
])

Simple Table w/ AwesomeTable

Create a table with icon button

View complete source here

import pandas as pd
from awesome_table import AwesomeTable
from awesome_table.columns import (Column, ColumnDType)

sample_data = {...}

AwesomeTable(pd.json_normalize(sample_data), columns=[
    Column(name='id', label='ID'),
    Column(name='name', label='Name'),
    Column(name='job_title', label='Job Title'),
    Column(name='avatar', label='Avatar'),
    Column(name='_url.social_media', label='Social Media', dtype=ColumnDType.ICONBUTTON, icon='fa-solid fa-share-nodes'), ## From FontAwesome v6.0.0
    Column(name='_url.document', label='Document', dtype=ColumnDType.DOWNLOAD),
])

Simple Table w/ AwesomeTable

Create a table with order

View complete source here

import pandas as pd
from awesome_table import AwesomeTable
from awesome_table.columns import (Column, ColumnDType)

sample_data = {...}

AwesomeTable(pd.json_normalize(sample_data), columns=[
    Column(name='id', label='ID'),
    Column(name='name', label='Name'),
    Column(name='job_title', label='Job Title'),
    Column(name='avatar', label='Avatar'),
    Column(name='_url.social_media', label='Social Media', dtype=ColumnDType.ICONBUTTON, icon='fa-solid fa-share-nodes'), ## From FontAwesome v6.0.0
    Column(name='_url.document', label='Document', dtype=ColumnDType.DOWNLOAD),
], show_order=True)

Simple Table w/ AwesomeTable

Create a table with search

View complete source here

import pandas as pd
from awesome_table import AwesomeTable
from awesome_table.columns import (Column, ColumnDType)

sample_data = {...}

AwesomeTable(pd.json_normalize(sample_data), columns=[
    Column(name='id', label='ID'),
    Column(name='name', label='Name'),
    Column(name='job_title', label='Job Title'),
    Column(name='avatar', label='Avatar'),
    Column(name='_url.social_media', label='Social Media', dtype=ColumnDType.ICONBUTTON, icon='fa-solid fa-share-nodes'), ## From FontAwesome v6.0.0
    Column(name='_url.document', label='Document', dtype=ColumnDType.DOWNLOAD),
], show_search=True)

Simple Table w/ AwesomeTable

Create a table with sidebar

View complete source here

import pandas as pd
from awesome_table import AwesomeTable
from awesome_table.columns import (Column, ColumnDType)

sample_data = {...}

AwesomeTable(pd.json_normalize(sample_data), columns=[
    Column(name='id', label='ID'),
    Column(name='name', label='Name'),
    Column(name='job_title', label='Job Title'),
    Column(name='avatar', label='Avatar'),
    Column(name='_url.social_media', label='Social Media', dtype=ColumnDType.ICONBUTTON, icon='fa-solid fa-share-nodes'), ## From FontAwesome v6.0.0
    Column(name='_url.document', label='Document', dtype=ColumnDType.DOWNLOAD),
], show_order=True, show_search=True, show_search_order_in_sidebar=True)

Simple Table w/ AwesomeTable

Create a table with image

View complete source here

import pandas as pd
from awesome_table import AwesomeTable
from awesome_table.columns import (Column, ColumnDType)

sample_data = {...}

AwesomeTable(pd.json_normalize(sample_data), columns=[
    Column(name='id', label='ID'),
    Column(name='name', label='Name'),
    Column(name='job_title', label='Job Title'),
    Column(name='avatar', label='Avatar', dtype=ColumnDType.IMAGE),
    Column(name='_url.social_media', label='Social Media', dtype=ColumnDType.ICONBUTTON, icon='fa-solid fa-share-nodes'), ## From FontAwesome v6.0.0
    Column(name='_url.document', label='Document', dtype=ColumnDType.DOWNLOAD),
], show_search=True, show_order=True)

Simple Table w/ AwesomeTable

About

Table with many features for Streamlit. This component use Bootstrap and FontAwesome. Created by caiodearaujo

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 54.1%
  • JavaScript 15.8%
  • TypeScript 15.6%
  • HTML 14.5%