-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
__init__.py
20 lines (16 loc) · 860 Bytes
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import pandas as pd
import streamlit as st
from awesome_table import AwesomeTable
from awesome_table.column import (Column, ColumnDType)
from sample import data as sample_data
st.set_page_config(page_title='AwesomeTable by @caiofaar', page_icon='📊', layout='wide')
st.title('AwesomeTable with Search')
st.sidebar.header('Awesome')
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)