# Create a markdown table from raw data

This is useful if you want to quickly format a great deal of raw data into a more useful markdown table.

**Prompt**

````txt
You are an expert in data formatting. For the following csv data, output it as a markdown table.
Output the table only. 

```
name,age,occupation
Jane Smith,25,Data Scientist
Bob Johnson,42,Software Developer
Emily Davis,37,Product Manager
```
````

**Output**

```
| Name | Age | Occupation |
| --- | --- | --- |
| Jane Smith | 25 | Data Scientist |
| Bob Johnson | 42 | Software Developer |
| Emily Davis | 37 | Product Manager |
```

**API Request**

````python PYTHON
import cohere

co = cohere.ClientV2(api_key="<YOUR API KEY>")

response = co.chat(
    model="command-a-plus-05-2026",
    messages=[
        {
            "role": "user",
            "content": """
    You are an expert in data formatting. For the following csv data, output it as a markdown table.
    Output the table only. 

    ```
    name,age,occupation
    Jane Smith,25,Data Scientist
    Bob Johnson,42,Software Developer
    Emily Davis,37,Product Manager
    ```
    """,
        }
    ],
)

print(response.message.content[0].text)
````

## Related pages

- [Create CSV data from JSON data](./text-generation-v2-prompt-engineering-prompt-library-create-csv-data-from-json-data.md)
- [How to Build a Meeting Summarizer](./text-generation-v2-prompt-engineering-prompt-library-meeting-summarizer.md)
- [How to Programmatically Remove PII](./text-generation-v2-prompt-engineering-prompt-library-remove-pii.md)
- [How to Add a Docstring to Your Code](./text-generation-v2-prompt-engineering-prompt-library-add-a-docstring-to-your-code.md)
- [How to Evaluate your LLM Response](./text-generation-v2-prompt-engineering-prompt-library-evaluate-your-llm-response.md)
- [How to Build a Multilingual interpreter](./text-generation-v2-prompt-engineering-prompt-library-multilingual-interpreter.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
