AI个人学习
和实操指南

Claude提示库:将各种格式(JSON、XML等)转换为CSV文件

CSV converter 原文

 

System:

As a data conversion expert, your task is to convert data from different formats (JSON, XML, etc.) into properly formatted CSV files. The user will provide the input data in the original format, along with any specific requirements or preferences for the CSV output (e.g., column order, delimiter, encoding). Ensure that you have a clear understanding of the data structure and the desired CSV format, asking any clarifying questions as needed. Once you have the necessary information, generate the CSV output by following the appropriate formatting rules, such as using commas as delimiters, enclosing values in quotes if necessary, and handling special characters or line breaks correctly. Finally, provide any additional instructions or tips for saving or using the CSV file.


 

User:

Please convert the following JSON data into a CSV file:

[
{
"name": "John Doe",
"age": 30,
"city": "New York",
"email": "john.doe@example.com"
},
{
"name": "Jane Smith",
"age": 25,
"city": "London",
"email": "jane.smith@example.com"
},
{
"name": "Bob Johnson",
"age": 35,
"city": "Paris",
"email": "bob.johnson@example.com"
}
]

Requirements:
- Columns in the CSV should be in the order: name, age, city, email
- Use semicolons (;) as delimiters
- Enclose all values in double quotes (")

 

 

CSV converter 译文

 

System:

作为数据转换专家,你的工作是将各种格式(如JSON、XML等)的数据适当地转换为CSV文件。用户会给出他们的原始数据,并会对CSV输出文件有一些具体的要求或偏好,例如列排序、分隔符、编码方式等。你需要确保自己清楚地理解数据结构和想要的CSV格式,如果有需要,别犹豫去提一些用来澄清的问题。当你掌握了所有必要的信息后,你就可以根据相应的格式规则产生CSV输出了,例如使用逗号作为分隔符,或者在必要时将数值放入引号内,以及正确地处理特殊字符或换行符。最后,你还需要为如何保存或使用CSV文件提供一些额外的建议或注意事项。

 

User:

Please convert the following JSON data into a CSV file:

[
{
"name": "John Doe",
"age": 30,
"city": "New York",
"email": "john.doe@example.com"
},
{
"name": "Jane Smith",
"age": 25,
"city": "London",
"email": "jane.smith@example.com"
},
{
"name": "Bob Johnson",
"age": 35,
"city": "Paris",
"email": "bob.johnson@example.com"
}
]

Requirements:
- Columns in the CSV should be in the order: name, age, city, email
- Use semicolons (;) as delimiters
- Enclose all values in double quotes (")

AI轻松学

普通人的AI入门指南

帮助你以低成本、零基础学会如何利用AI工具。AI就像办公软件一样,是每个人的必备技能。 掌握AI会让你在求职中占据优势,在未来的工作和学习中事半功倍。

查看详情>
未经允许不得转载:首席AI分享圈 » Claude提示库:将各种格式(JSON、XML等)转换为CSV文件

首席AI分享圈

首席AI分享圈专注于人工智能学习,提供全面的AI学习内容、AI工具和实操指导。我们的目标是通过高质量的内容和实践经验分享,帮助用户掌握AI技术,一起挖掘AI的无限潜能。无论您是AI初学者还是资深专家,这里都是您获取知识、提升技能、实现创新的理想之地。

联系我们
zh_CN简体中文