'During the data fetching by API, some of the fields are missing how i can manage it?

'''''' --------------------------------------------------------------------------- KeyError Traceback (most recent call last) C:\Users\KHUSHB~1\AppData\Local\Temp/ipykernel_8780/1143884894.py in 9 longitude.append(i['location']['longitude']) 10 precision.append(i['location']['precision']) ---> 11 postalCode.append(i['location']['postalCode']) 12 13 d={"address":address,"latitude":latitude,"longitude":longitude,"precision":precision,"postalCode":postalCode}

KeyError: 'postalCode'

'''''

snapshop of Jupyter notebook



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source