Dummy Dataset

作者 phuryn8607e3b07781無授權條款26K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫3 週前更新

Generate realistic dummy datasets for testing with customizable columns, constraints, and output formats (CSV, JSON, SQL, Python script). Use when creating test data, building mock datasets, or generating sample data for development and demos.

僅含說明Data & Analytics
AI 產生的概覽

產生逼真的虛擬資料集,可自訂欄位、限制條件與輸出格式,例如 CSV、JSON、SQL 或 Python。

功能
此技能引導代理產生合成測試資料:判斷資料領域、定義欄位名稱與型別、設定列數,並套用貼近真實的模式與業務規則。它能輸出可直接執行的 Python 產生器腳本,或直接輸出 CSV、JSON、SQL INSERT 等資料檔案,並附上驗證說明與快速上手指示。產出的是供開發、展示與測試環境使用的樣本資料。
適用情境
當你需要測試資料、模擬資料集或樣本記錄,用於開發、展示或填充測試環境時使用。適合可指定欄位結構、列數與輸出格式的情境。
執行需求
此技能未附帶腳本,僅為指示文件。若要執行其產生的 Python 腳本,需要 Python 執行環境與標準函式庫(csv、json、datetime、random)。

Dummy Dataset Generation

Generate realistic dummy datasets for testing with customizable columns, constraints, and output formats (CSV, JSON, SQL, Python script). Creates executable scripts or direct data files for immediate use.

Use when: Creating test data, generating sample datasets, building realistic mock data for development, or populating test environments.

Arguments:

  • $PRODUCT: The product or system name
  • $DATASET_TYPE: Type of data (e.g., customer feedback, transactions, user profiles)
  • $ROWS: Number of rows to generate (default: 100)
  • $COLUMNS: Specific columns or fields to include
  • $FORMAT: Output format (CSV, JSON, SQL, Python script)
  • $CONSTRAINTS: Additional constraints or business rules

Step-by-Step Process

  1. Identify dataset type - Understand the data domain
  2. Define column specifications - Names, data types, and value ranges
  3. Determine row count - How many sample records needed
  4. Select output format - CSV, JSON, SQL INSERT, or Python script
  5. Apply realistic patterns - Ensure data looks authentic and valid
  6. Add business constraints - Respect business logic and relationships
  7. Generate or script data - Create executable output
  8. Validate output - Ensure data quality and completeness

Template: Python Script Output

python
import csvimport jsonfrom datetime import datetime, timedeltaimport random
# ConfigurationROWS = $ROWSFILENAME = "$DATASET_TYPE.csv"
# Column definitions with realistic value generatorscolumns = {    "id": "auto-increment",    "name": "first_last_name",    "email": "email",    "created_at": "timestamp",    # Add more columns...}
def generate_dataset():    """Generate realistic dummy dataset"""    data = []    for i in range(1, ROWS + 1):        record = {            "id": f"U{i:06d}",            # Generate values based on column definitions        }        data.append(record)    return data
def save_as_csv(data, filename):    """Save dataset as CSV"""    with open(filename, 'w', newline='') as f:        writer = csv.DictWriter(f, fieldnames=data[0].keys())        writer.writeheader()        writer.writerows(data)
if __name__ == "__main__":    dataset = generate_dataset()    save_as_csv(dataset, FILENAME)    print(f"Generated {len(dataset)} records in {FILENAME}")

Example Dataset Specification

Dataset Type: Customer Feedback

Columns:

  • feedback_id (auto-increment, U001, U002...)
  • customer_name (realistic names)
  • email (valid email format)
  • feedback_date (dates last 90 days)
  • rating (1-5 stars)
  • category (Bug, Feature Request, Complaint, Praise)
  • text (realistic feedback)
  • product (electronics, clothing, home)

Constraints:

  • Ratings skewed: 40% 5-star, 30% 4-star, 20% 3-star, 10% 1-2 star
  • Bug category only with ratings 1-3
  • Feature requests only with ratings 3-5
  • Email domains realistic (gmail, yahoo, company.com)

Output Deliverables

  • Ready-to-execute Python script OR direct data file
  • CSV file with proper headers and formatting
  • JSON file with valid structure and types
  • SQL INSERT statements for database population
  • Data validation and constraint compliance
  • Realistic, business-appropriate values
  • Documentation of data generation logic
  • Quick-start instructions for using the dataset

Output Formats

CSV: Flat tabular format, easy to import into spreadsheets and databases

JSON: Nested structure, ideal for APIs and NoSQL databases

SQL: INSERT statements, directly executable on relational databases

Python Script: Executable generator for custom or large datasets

來源與署名

來源:phuryn/pm-skills位於pm-execution/skills/dummy-dataset提交8607e3b

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架