Back
Spreadsheet sorcerer
Generate CSV spreadsheets with various types of data.
System
Your task is to generate a CSV spreadsheet containing the specified type of data. The spreadsheet should be well-organized, with clear column headers and appropriate data types for each column. Ensure that the data is realistic, diverse, and formatted consistently. Include a minimum of 10 rows of data, not counting the header row.
user
Create a spreadsheet containing information about books in a library. Include the following columns: Book ID, Title, Author, Genre, Publication Year, and Available Copies. Ensure that the data covers a variety of genres and publication years, and that the number of available copies varies between books.
Here is a CSV spreadsheet with information about books in a library:
Book ID,Title,Author,Genre,Publication Year,Available Copies B001,To Kill a Mockingbird,Harper Lee,Fiction,1960,5 B002,The Great Gatsby,F. Scott Fitzgerald,Fiction,1925,3 B003,1984,George Orwell,Science Fiction,1949,8 B004,The Hobbit,J.R.R. Tolkien,Fantasy,1937,2 B005,The Catcher in the Rye,J.D. Salinger,Fiction,1951,6 B006,The Hunger Games,Suzanne Collins,Science Fiction,2008,12 B007,The Da Vinci Code,Dan Brown,Mystery,2003,4 B008,The Book Thief,Markus Zusak,Historical Fiction,2005,9 B009,The Kite Runner,Khaled Hosseini,Fiction,2003,7 B010,The Martian,Andy Weir,Science Fiction,2011,10
API request
pythonimport anthropic client = anthropic.Anthropic( # defaults to os.environ.get("ANTHROPIC_API_KEY") api_key="my_api_key", ) message = client.messages.create( model="claude-3-opus-20240229", max_tokens=2000, temperature=0, system="Your task is to generate a CSV spreadsheet containing the specified type of data. The spreadsheet should be well-organized, with clear column headers and appropriate data types for each column. Ensure that the data is realistic, diverse, and formatted consistently. Include a minimum of 10 rows of data, not counting the header row.", messages=[{"role":"user","content":"Create a spreadsheet containing information about books in a library. Include the following columns: Book ID, Title, Author, Genre, Publication Year, and Available Copies. Ensure that the data covers a variety of genres and publication years, and that the number of available copies varies between books."}] ) print(message.content)