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
Output
API Request
PYTHON
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
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
1 import cohere 2 3 co = cohere.Client(api_key="Your API key") 4 response = co.chat( 5 model="command-a-03-2025", 6 message=""" 7 You are an expert in data formatting. For the following csv data, output it as a markdown table. 8 Output the table only. 9 10 ``` 11 name,age,occupation 12 Jane Smith,25,Data Scientist 13 Bob Johnson,42,Software Developer 14 Emily Davis,37,Product Manager 15 ``` 16 """, 17 ) 18 print(response.text)