Dataset Processor in Python

  • drobnikj/dataset-processor-python
  • Modified
  • Users 3
  • Runs 273
  • Created by Author's avatarJakub Drobn铆k

This actor utilizes Python to process the dataset.

Dataset Processor in Python

To run the code examples, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token. For a more detailed explanation, please read about running Actors via the API in Apify Docs.

# Set API token

# Prepare Actor input
cat > input.json <<'EOF'
  "dataset": "test-dataset",
  "rowFnc": "def process_row(row):\n    row[\"process\"] = True\n    print(f'Row was procesed {row}')\n    return row\n"

# Run the Actor
curl "https://api.apify.com/v2/acts/drobnikj~dataset-processor-python/runs?token=$API_TOKEN" \
  -X POST \
  -d @input.json \
  -H 'Content-Type: application/json'