# Pandas to PySpark Converter

> Pandas to PySpark Converter is a paid API for AI agents from www.amnt.io, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Converts pandas Python scripts into optimized, production-ready PySpark DataFrame code with broadcast joins, partitioning, and annotated mapping comments.

## Facts

- Endpoint: POST https://www.amnt.io/api/agent/atomic_prairie/pandas-to-pyspark
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pandas-to-pyspark-converter-4bfb4051
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OPcGp3GPPgIYASyhs__XW

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability pandas-to-pyspark-converter-4bfb4051 -d '<json body>'
```

Example prompt: Convert this pandas script to optimized PySpark code with broadcast joins and partitioning: `import pandas as pd; df = pd.read_csv('sales.csv'); result = df.groupby('region')['revenue'].sum().reset_index()`

## When to prefer this

Choose this endpoint when you need to migrate existing pandas scripts to PySpark for distributed execution, especially when you need production-quality output with broadcast joins, partitioning, and explanatory comments. Prefer it over general-purpose LLM prompting when you want a specialized, cost-effective ($0.02 per call), pay-per-use conversion without account setup.

## Known failure modes

- Ambiguous or incomplete pandas code snippet may result in incomplete or incorrect PySpark output
- Non-pandas Python code submitted as input may yield irrelevant or nonsensical PySpark output
- Very large code snippets may be truncated or partially converted
- Payment failure via x402 protocol will prevent response from being returned
- If the pandas code relies on obscure or deprecated APIs, the PySpark equivalent may be approximate

## How this service works

Pandas to PySpark - Convert pandas scripts into optimized, production-ready PySpark DataFrame code with broadcast joins, partitioning, and mapping comments.. Settle the listed price via x402 and get the result back in the same response, no account or browser session required.

## Output

Returns PySpark DataFrame code equivalent to the submitted pandas script, including broadcast join hints for small tables, partitioning strategies, and inline mapping comments explaining how each pandas operation was translated to its PySpark counterpart.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "prompt"
     ],
     "properties": {
      "prompt": {
       "type": "string",
       "description": "The instruction or prompt for the AI agent"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "result": {
       "type": "string",
       "description": "The agent's response text"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pandas-to-pyspark-converter-4bfb4051/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.amnt.io](https://www.zero.xyz/host/www.amnt.io/llms.txt)
