Skip to main content
Glama

fill_missing_values

Handle missing data in CSV files using strategies like drop, fill with specific values, forward/backward fill, or statistical imputation methods for complete datasets.

Instructions

Fill or remove missing values with comprehensive strategy support.

Provides multiple strategies for handling missing data, including statistical imputation methods. Handles different data types appropriately and validates strategy compatibility with column types.

Examples: # Drop rows with any missing values fill_missing_values(ctx, strategy="drop")

# Fill missing values with 0 fill_missing_values(ctx, strategy="fill", value=0) # Forward fill specific columns fill_missing_values(ctx, strategy="forward", columns=["price", "quantity"]) # Fill with column mean for numeric columns fill_missing_values(ctx, strategy="mean", columns=["age", "salary"])

Input Schema

NameRequiredDescriptionDefault
strategyNoStrategy for handling missing values (drop, fill, forward, backward, mean, median, mode)drop
valueNoValue to use when strategy is 'fill'
columnsNoColumns to process (None = all columns)

Input Schema (JSON Schema)

{ "properties": { "columns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Columns to process (None = all columns)" }, "strategy": { "default": "drop", "description": "Strategy for handling missing values (drop, fill, forward, backward, mean, median, mode)", "enum": [ "drop", "fill", "forward", "backward", "mean", "median", "mode" ], "type": "string" }, "value": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Value to use when strategy is 'fill'" } }, "type": "object" }

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/jonpspri/databeak'

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