home/coding/prompt-61

Prompt

GPTClaudeDeepSeek··1,248 copies·updated 2026-07-14
prompt-61.prompt
Write a Python function `column_sum(csv_text, column)` that parses `csv_text` (a string of CSV
with a header row) and returns the sum of the named `column` as a float.

Values in the column are numeric. Handle quoted fields containing commas correctly (standard CSV
quoting). If the column name is not in the header, raise `KeyError`.

Put it in a single Python code block. It will be imported as `from solution import column_sum`.

when to use it

Community prompt sourced from the open-source GitHub repo Green-PT/honey-for-devs (MIT). A "Prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

codingcommunitydeveloper

source

Green-PT/honey-for-devs · MIT