import csv
import json

x = """[
    [
  {
    "state": "Kerala",
    "districtData": [
      {
        "district": "Thrissur",
        "confirmed": 11,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Alappuzha",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Kasaragod",
        "confirmed": 129,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 8
        }
      },
      {
        "district": "Pathanamthitta",
        "confirmed": 13,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Kannur",
        "confirmed": 48,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Ernakulam",
        "confirmed": 23,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Kottayam",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Thiruvananthapuram",
        "confirmed": 13,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Idukki",
        "confirmed": 10,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 5
        }
      },
      {
        "district": "Malappuram",
        "confirmed": 13,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Kozhikode",
        "confirmed": 7,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Palakkad",
        "confirmed": 6,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Wayanad",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Kollam",
        "confirmed": 5,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 2
        }
      }
    ]
  },
  {
    "state": "Delhi",
    "districtData": [
      {
        "district": "East Delhi",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "South West Delhi",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "West Delhi",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "North Delhi",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "New Delhi",
        "confirmed": 5,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "South Delhi",
        "confirmed": 26,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "North East Delhi",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "North West Delhi",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Unknown",
        "confirmed": 249,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 141
        }
      }
    ]
  },
  {
    "state": "Telangana",
    "districtData": [
      {
        "district": "Hyderabad",
        "confirmed": 36,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Karimnagar",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Bhadradri Kothagudem",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Ranga Reddy",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Medchal Malkajgiri",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Unknown",
        "confirmed": 109,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 27
        }
      }
    ]
  },
  {
    "state": "Rajasthan",
    "districtData": [
      {
        "district": "Jaipur",
        "confirmed": 42,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 7
        }
      },
      {
        "district": "Jhunjhunu",
        "confirmed": 9,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Bhilwara",
        "confirmed": 22,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Jodhpur",
        "confirmed": 15,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Unknown",
        "confirmed": 25,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 4
        }
      },
      {
        "district": "Pratapgarh",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Ajmer",
        "confirmed": 5,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Alwar",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Dungarpur",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Tonk",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Churu",
        "confirmed": 7,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Haryana",
    "districtData": [
      {
        "district": "Gurugram",
        "confirmed": 24,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Faridabad",
        "confirmed": 6,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Panipat",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Panchkula",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Sonipat",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Palwal",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 3
        }
      },
      {
        "district": "Ambala",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 2
        }
      },
      {
        "district": "Sirsa",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Hisar",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Rohtak",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      }
    ]
  },
  {
    "state": "Uttar Pradesh",
    "districtData": [
      {
        "district": "Agra",
        "confirmed": 9,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Unknown",
        "confirmed": 47,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 4
        }
      },
      {
        "district": "Ghaziabad",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Lucknow",
        "confirmed": 9,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Gautam Buddha Nagar",
        "confirmed": 34,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Moradabad",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Varanasi",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Kanpur Nagar",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Pilibhit",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Jaunpur",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Baghpat",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Meerut",
        "confirmed": 5,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Bareilly",
        "confirmed": 6,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Ladakh",
    "districtData": [
      {
        "district": "Leh",
        "confirmed": 11,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Kargil",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Tamil Nadu",
    "districtData": [
      {
        "district": "Kancheepuram",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Chennai",
        "confirmed": 49,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 20
        }
      },
      {
        "district": "Erode",
        "confirmed": 27,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 6
        }
      },
      {
        "district": "Coimbatore",
        "confirmed": 33,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Tirunelveli",
        "confirmed": 30,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Tiruppur",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Madurai",
        "confirmed": 15,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Salem",
        "confirmed": 6,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Vellore",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Tiruchirappalli",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Chengalpattu",
        "confirmed": 15,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 7
        }
      },
      {
        "district": "Thanjavur",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Virudhunagar",
        "confirmed": 10,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 9
        }
      },
      {
        "district": "Karur",
        "confirmed": 17,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 15
        }
      },
      {
        "district": "Tiruvannamalai",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Viluppuram",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Namakkal",
        "confirmed": 18,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Kanniyakumari",
        "confirmed": 5,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Thoothukkudi",
        "confirmed": 5,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 2
        }
      },
      {
        "district": "Theni",
        "confirmed": 20,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Dindigul",
        "confirmed": 17,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Sivaganga",
        "confirmed": 5,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Tirupathur",
        "confirmed": 7,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Thiruvarur",
        "confirmed": 7,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 5
        }
      },
      {
        "district": "Tirupattur",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 3
        }
      },
      {
        "district": "Ranipet",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 4
        }
      },
      {
        "district": "Ramanathapuram",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 2
        }
      },
      {
        "district": "Thiruvallur",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      }
    ]
  },
  {
    "state": "Jammu and Kashmir",
    "districtData": [
      {
        "district": "Jammu",
        "confirmed": 9,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Srinagar",
        "confirmed": 17,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Bandipore",
        "confirmed": 9,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Unknown",
        "confirmed": 27,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 8
        }
      },
      {
        "district": "Rajouri",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Badgam",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Baramula",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Shopian",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Karnataka",
    "districtData": [
      {
        "district": "Bengaluru",
        "confirmed": 47,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Kalaburagi",
        "confirmed": 5,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Kodagu",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Chikkaballapura",
        "confirmed": 10,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Mysuru",
        "confirmed": 21,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 2
        }
      },
      {
        "district": "Dharwad",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Uttara Kannada",
        "confirmed": 9,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Dakshina Kannada",
        "confirmed": 8,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Udupi",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Chitradurga",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Tumakuru",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Davanagere",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Ballari",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Bidar",
        "confirmed": 10,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 10
        }
      }
    ]
  },
  {
    "state": "Maharashtra",
    "districtData": [
      {
        "district": "Pune",
        "confirmed": 61,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 9
        }
      },
      {
        "district": "Mumbai",
        "confirmed": 198,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 57
        }
      },
      {
        "district": "Nagpur",
        "confirmed": 12,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Thane",
        "confirmed": 10,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 5
        }
      },
      {
        "district": "Ahmadnagar",
        "confirmed": 17,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 9
        }
      },
      {
        "district": "Yavatmal",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Aurangabad",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Ratnagiri",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Mumbai Suburban",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Unknown",
        "confirmed": 70,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Sangli",
        "confirmed": 25,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Satara",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Kolhapur",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Gondiya",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Jalgaon",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Nashik",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Buldana",
        "confirmed": 6,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      }
    ]
  },
  {
    "state": "Punjab",
    "districtData": [
      {
        "district": "Amritsar",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Shahid Bhagat Singh Nagar",
        "confirmed": 19,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "S.A.S. Nagar",
        "confirmed": 9,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Hoshiarpur",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Jalandhar",
        "confirmed": 5,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Unknown",
        "confirmed": 7,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Ludhiana",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Andhra Pradesh",
    "districtData": [
      {
        "district": "S.P.S. Nellore",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Prakasam",
        "confirmed": 15,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Visakhapatnam",
        "confirmed": 11,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "East Godavari",
        "confirmed": 6,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Krishna",
        "confirmed": 14,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 8
        }
      },
      {
        "district": "Chittoor",
        "confirmed": 7,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Guntur",
        "confirmed": 9,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Kurnool",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Anantapur",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "West Godavari",
        "confirmed": 13,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Y.S.R.",
        "confirmed": 16,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Unknown",
        "confirmed": 45,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 21
        }
      }
    ]
  },
  {
    "state": "Uttarakhand",
    "districtData": [
      {
        "district": "Dehradun",
        "confirmed": 5,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Pauri Garhwal",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Odisha",
    "districtData": [
      {
        "district": "Khordha",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Bhadrak",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Puducherry",
    "districtData": [
      {
        "district": "Mahe",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Puducherry",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "West Bengal",
    "districtData": [
      {
        "district": "Kolkata",
        "confirmed": 11,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "North 24 Parganas",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Nadia",
        "confirmed": 5,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Medinipur East",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Kalimpong",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Hooghly",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Howrah",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "South 24 Parganas",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Unknown",
        "confirmed": 26,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 16
        }
      }
    ]
  },
  {
    "state": "Chandigarh",
    "districtData": [
      {
        "district": "Chandigarh",
        "confirmed": 16,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      },
      {
        "district": "Unknown",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Chhattisgarh",
    "districtData": [
      {
        "district": "Raipur",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Rajnandgaon",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Bilaspur",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Durg",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Korba",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Unknown",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Gujarat",
    "districtData": [
      {
        "district": "Rajkot",
        "confirmed": 10,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Surat",
        "confirmed": 12,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Ahmadabad",
        "confirmed": 31,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Vadodara",
        "confirmed": 9,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Gandhinagar",
        "confirmed": 11,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Kachchh",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Mahesana",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Bhavnagar",
        "confirmed": 6,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Porbandar",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Gir Somnath",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Panch Mahals",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Himachal Pradesh",
    "districtData": [
      {
        "district": "Kangra",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Madhya Pradesh",
    "districtData": [
      {
        "district": "Jabalpur",
        "confirmed": 8,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Bhopal",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Indore",
        "confirmed": 63,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Ujjain",
        "confirmed": 5,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Gwalior",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Shivpuri",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Unknown",
        "confirmed": 23,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 7
        }
      },
      {
        "district": "Morena",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 2
        }
      }
    ]
  },
  {
    "state": "Bihar",
    "districtData": [
      {
        "district": "Munger",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Patna",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Siwan",
        "confirmed": 5,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Nalanda",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Unknown",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Lakhisarai",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Bhagalpur",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Gopalganj",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Gaya",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Begusarai",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Manipur",
    "districtData": [
      {
        "district": "Imphal West",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Unknown",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      }
    ]
  },
  {
    "state": "Mizoram",
    "districtData": [
      {
        "district": "Aizawl",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Goa",
    "districtData": [
      {
        "district": "North Goa",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Unknown",
        "confirmed": 2,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Andaman and Nicobar Islands",
    "districtData": [
      {
        "district": "South Andaman",
        "confirmed": 5,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "North and Middle Andaman",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Unknown",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Jharkhand",
    "districtData": [
      {
        "district": "Ranchi",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Hazaribagh",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      }
    ]
  },
  {
    "state": "Assam",
    "districtData": [
      {
        "district": "Cachar",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Kamrup Metropolitan",
        "confirmed": 4,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Jorhat",
        "confirmed": 8,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      },
      {
        "district": "Goalpara",
        "confirmed": 3,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 0
        }
      }
    ]
  },
  {
    "state": "Arunachal Pradesh",
    "districtData": [
      {
        "district": "Unknown",
        "confirmed": 1,
        "lastupdatedtime": "",
        "delta": {
          "confirmed": 1
        }
      }
    ]
  }
]
]"""

x = json.loads(x)

f = csv.writer(open("test.csv", "wb+"))

for x in x:
    f.writerow([[state],[district data],[district],[confirmed],x[lastupdatedtime]])

