Skip to main content
Glama
by mckinsey
helper.py488 B
"""Helper Functions For Vizro AI.""" import pandas as pd def _get_df_info(df: pd.DataFrame, n_sample: int = 5) -> tuple[str, str]: """Get the dataframe schema and head info as string.""" formatted_pairs = [f"{col_name}: {dtype}" for col_name, dtype in df.dtypes.items()] schema_string = "\n".join(formatted_pairs) return schema_string, df.sample(n_sample, replace=True, random_state=19).to_markdown() class DebugFailure(Exception): """Debug Failure.""" pass

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mckinsey/vizro'

If you have feedback or need assistance with the MCP directory API, please join our Discord server