UI
table
Display data in an interactive table format
The table
function provides an easy way to display datasets in an interactive table format, making it simple to explore and understand your data.
Parameters
data
(Pandas DataFrame): The dataset you want to display. Must be a Pandas DataFrame or a list of dictionaries.title
(str, optional): An optional title to display above the table.limit
(int, optional): Maximum number of rows to display. If not specified, shows all rows.
Returns
Dict
containing the table component metadata and processed data.
Usage Example
Here’s an example of how to use the table
function:
Key Features
- Automatic Data Processing: Handles various data types including timestamps, numpy arrays, and nested structures
- Interactive Display: Renders data in a format optimized for exploration and analysis
- Error Handling: Gracefully handles edge cases and provides clear error messages
- Flexible Input: Accepts both Pandas DataFrames and lists of dictionaries
Data Type Support
The table component automatically handles various data types:
- Basic types (strings, numbers, booleans)
- Timestamps and datetime objects
- Numpy arrays and numeric types
- Missing values (None, NaN)
- Nested data structures (lists, arrays)
Best Practices
-
Large Datasets: For large datasets, consider limiting the rows before display:
-
Column Selection: Select relevant columns to improve readability:
-
Data Preprocessing: Clean and format data before display: