#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# @Project : Python. | |
# @File : 997_streamlit_aggrid | |
# @Time : 2022/10/17 下午1:14 | |
# @Author : yuanjie | |
# @WeChat : meutils | |
# @Software : PyCharm | |
# @Description : | |
from st_aggrid import AgGrid | |
import pandas as pd | |
df = pd.read_csv('./data/airline-safety.csv') | |
AgGrid(df) | |
# from st_aggrid import AgGrid, DataReturnMode, GridUpdateMode, GridOptionsBuilder | |
# options_builder = GridOptionsBuilder.from_dataframe(df) | |
# options_builder.configure_default_column(groupable=True, value=True, enableRowGroup=True, aggFunc='sum', editable=True, wrapText=True, autoHeight=True) | |
# options_builder.configure_column('col1', pinned='left') | |
# options_builder.configure_column('col2', pinned='left') | |
# grid_options = options_builder.build() | |
# grid_return = AgGrid(df, grid_options, theme='blue') |