HF RL Explorer

Task: Handle Missing Dictionary Keys When Converting JSON to CSV

Task: Handle Missing Dictionary Keys When Converting JSON to CSV: a task in Terminal-Lego-15k (Harbor dataset). You are working with JSON product data that needs to be converted to CSV format. The JSON data contains product information, but many products have missing fields. When accessing…

The task

You are working with JSON product data that needs to be converted to CSV format. The JSON data contains product information, but many products have missing fields. When accessing dictionary keys that don't exist, Python raises a `KeyError`. Your task is to write a Python script that gracefully handles missing keys by…

Part of PrimeIntellect/Terminal-Lego-15k.