size_categories:10K<n<100K format:parquet modality:text library:datasets library:pandas library:mlcroissant library:polars region:us
---
dataset_info:
  features:
  - name: messages
    list:
    - name: content
      dtype: string
    - name: role
      dtype: string
  - name: conversation_id
    dtype: int64
  splits:
  - name: train
    num_bytes: 130191508.45510554
    num_examples: 57931
  download_size: 66425553
  dataset_size: 130191508.45510554
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
---
# Dataset Card for "Magicoder-Evol-Instruct-110K-python"

```
from datasets import load_dataset

# Load your dataset
dataset = load_dataset("pxyyy/Magicoder-Evol-Instruct-110K", split="train")  # Replace with your dataset and split

# Define a filter function
def contains_python(entry):
    for c in entry["messages"]:
        if "python" in c['content'].lower():
            return True
    # return "python" in entry["messages"].lower()  # Replace 'column_name' with the column to search

# Apply the filter
filtered_dataset = dataset.filter(contains_python)

# Preview the filtered dataset
print(len(filtered_dataset))

filtered_dataset.push_to_hub("pxyyy/Magicoder-Evol-Instruct-110K-python")  # Replace with your dataset name and API key

```

[More Information needed](https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)