Skip to main content

Configura automaticamente o AgGrid no Streamlit com base em um DataFrame

Project description

make-aggrid

make-aggrid é uma biblioteca Python que facilita a configuração avançada do componente AgGrid para uso com Streamlit. Basta passar um DataFrame e ela automaticamente aplica filtros, formatações e estilos adequados com base nos tipos de dados.

Instalação

pip install make-aggrid

Uso Básico

import pandas as pd
import streamlit as st
from st_aggrid import AgGrid
from make_aggrid import make_grid

df = pd.read_csv("dados.csv")

grid_options = make_grid(df)
AgGrid(df, gridOptions=grid_options)

Recursos incluídos

  • Filtros automáticos para texto, número e datas
  • Formatação brasileira para números e datas (pt-BR)
  • Alinhamento de colunas conforme tipo
  • Edição inline
  • Paginação e animações

Exemplo Avançado com Streamlit

import streamlit as st
import pandas as pd
from st_aggrid import AgGrid
from make_aggrid import make_grid

data = {
    "Nome": ["Ana", "João", "Carlos"],
    "Idade": [23, 35, 29],
    "Salário": [3000.50, 5000.00, 4200.75],
    "Data de Admissão": pd.to_datetime(["2020-01-15", "2019-03-10", "2021-07-22"])
}

df = pd.DataFrame(data)

st.title("Tabela Interativa com AgGrid")

grid_options = make_grid(df)
AgGrid(df, gridOptions=grid_options, editable=True, fit_columns_on_grid_load=True)

Licença

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

make_aggrid-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

make_aggrid-0.1.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file make_aggrid-0.1.0.tar.gz.

File metadata

  • Download URL: make_aggrid-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.6 Windows/11

File hashes

Hashes for make_aggrid-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7a07c80e4a37ca0d3938a4a88eeb62edc56d92c41e5dadc7789cfd2c849fc3d2
MD5 bccb41313f68c2d370532e38a6146324
BLAKE2b-256 a068fb0176e90d5c49aa1d4f9fe9308077ef8bc5484012954046d482e2a42c50

See more details on using hashes here.

File details

Details for the file make_aggrid-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: make_aggrid-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.6 Windows/11

File hashes

Hashes for make_aggrid-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 15692d120c30f8df9ef70ae31547eea61abd3cc3a0e9fcd32c50ec2c7d3c49e2
MD5 f2ec7044bfb3462e7027a36adea92c31
BLAKE2b-256 c7c9aef0c6dbbec37edd7e7967daa3bfa6f91f769cdc692beb7d40e536cdc3c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page