Skip to content

Commit

Permalink
fix: name cell
Browse files Browse the repository at this point in the history
  • Loading branch information
srini047 authored Oct 6, 2023
1 parent 5cb83c3 commit a7dfcdd
Showing 1 changed file with 27 additions and 12 deletions.
39 changes: 27 additions & 12 deletions JSON/JSON_Get_keys.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"tags": []
},
"source": [
"**Author:** [Firstname Lastname]()"
"**Author:** [Sriniketh Jayasendil](https://www.linkedin.com/in/sriniketh-jayasendil/)"
]
},
{
Expand Down Expand Up @@ -74,7 +74,9 @@
"tags": []
},
"source": [
"**References:**\n- [JSON - Wikipedia](https://en.wikipedia.org/wiki/JSON)\n- [JSON - Tutorialspoint](https://www.tutorialspoint.com/json/index.htm)"
"**References:**\n",
"- [JSON - Wikipedia](https://en.wikipedia.org/wiki/JSON)\n",
"- [JSON - Tutorialspoint](https://www.tutorialspoint.com/json/index.htm)"
]
},
{
Expand Down Expand Up @@ -107,8 +109,10 @@
"papermill": {},
"tags": []
},
"source": "import json",
"outputs": []
"outputs": [],
"source": [
"import json"
]
},
{
"cell_type": "markdown",
Expand All @@ -118,7 +122,8 @@
"tags": []
},
"source": [
"### Setup variables\n- `json_file`: path to the JSON file"
"### Setup variables\n",
"- `json_file`: path to the JSON file"
]
},
{
Expand All @@ -129,8 +134,10 @@
"papermill": {},
"tags": []
},
"source": "json_file = \"data.json\"",
"outputs": []
"outputs": [],
"source": [
"json_file = \"data.json\""
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -173,8 +180,14 @@
"papermill": {},
"tags": []
},
"source": "# Open JSON file\nwith open(json_file) as f:\n data = json.load(f)\n# List keys\nkeys = list(data.keys())",
"outputs": []
"outputs": [],
"source": [
"# Open JSON file\n",
"with open(json_file) as f:\n",
" data = json.load(f)\n",
"# List keys\n",
"keys = list(data.keys())"
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -206,8 +219,10 @@
"papermill": {},
"tags": []
},
"source": "print(keys)",
"outputs": []
"outputs": [],
"source": [
"print(keys)"
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -249,4 +264,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}

0 comments on commit a7dfcdd

Please sign in to comment.