Hi,
I’m trying to read a json url in notebook however I’ve got this error:
“TypeError: list indices must be integers or slices, not str”
This is de json url: https://servicios.ine.es/wstempus/js/es/DATOS_TABLA/33848?tip=AM&
and the idea is see it in jupyter notebook as a table with this columns
“Año”, “Municipio”, “De 0 a 4 años”, “De 5 a 9 años”, “De 10 a 14 años”, etc, but I can’t do it
Any idea or help?
What can you do? You got far enough to somehow get “TypeError: list indices must be integers or slices, not str”; however, you don’t share what you tried, which is always expected when asking for help.
I’d add that this is not on-topic for this forum. This looks to be a Python question and not a Jupyter question. A good way to tell is to ask yourself if I ran this code as a Python script or in the Python interpreter directly, would the the outcome be expected to be the same? If that is the case, then it isn’t suitable for this forum.
My advice above will be pertinent wherever you post a question like this.