--- dataset_info: features: - name: code dtype: string - name: repo_name dtype: string - name: path dtype: string - name: language dtype: string - name: license dtype: string - name: size dtype: int64 splits: - name: train num_bytes: 360682958 num_examples: 45001 - name: validation num_bytes: 37445138 num_examples: 5000 download_size: 141557496 dataset_size: 398128096 configs: - config_name: default data_files: - split: train path: data/train-* - split: validation path: data/validation-* --- # ๐Ÿ CodeParrot Python Only This dataset contains **Python-only source code** extracted from the larger [CodeParrot](https://huggingface.co/datasets/codeparrot) corpus. It includes high-quality `.py` files filtered from public GitHub repositories and curated for use in training large language models (LLMs) on Python code generation tasks. ## ๐Ÿ“ฆ Dataset Summary - โœ… Filtered to include **only Python code** - ๐Ÿงน Cleaned to remove non-source content (e.g., binaries, notebooks, scripts with mixed languages) - ๐Ÿง  Ideal for training or evaluating code generation models - ๐Ÿงพ Each entry is a code snippet or full Python file stored as raw text ## ๐Ÿ’ก Use Cases This dataset is best suited for: - Training/fine-tuning LLMs for: - Python code generation - Auto-completion - Bug detection - Code summarization - Evaluating code-specific capabilities of general LLMs - Research in code intelligence, representation learning, and software engineering ## ๐Ÿ“ Example Format Each record is a single code block: ```json { "code": "def hello_world():\n print('Hello, world!')" } ``` ๐Ÿš€ How to Use ``` from datasets import load_dataset ds = load_dataset("theothertom/codeparrot-python-only") print(ds["train"][0]["code"]) ```