💻 Coding & Development Prompts

Python, JavaScript, SQL, debugging, API

← All Categories
2 prompts in Python

Python Script - Read and Clean CSV

coding Python Beginner
Write a Python script that: 1) Reads a CSV file using pandas, 2) Shows basic info (shape, dtypes, null counts), 3) Removes duplicate rows, 4) Fills missing values (numeric with median, text with mode), 5) Strips whitespace from string columns, 6) Standardizes column names (lowercase, underscores), 7) Saves the cleaned file as a new CSV. Include error handling and comments explaining each step.
💡 Add a requirements.txt with pandas version. Always check the output after cleaning.

REST API with Flask

coding Python Intermediate
Build a simple REST API using Python Flask with these endpoints: 1) GET /items - list all items with pagination, 2) GET /items/<id> - get single item, 3) POST /items - create new item (validate input), 4) PUT /items/<id> - update item, 5) DELETE /items/<id> - delete item. Use SQLite for storage. Include: error handling with proper HTTP status codes, input validation, CORS headers, and a requirements.txt.
💡 Add rate limiting and authentication before deploying to production.