Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 57748d3

Browse files
Updated working with JSON
1 parent 326f1e1 commit 57748d3

File tree

10 files changed

+958
-239
lines changed

10 files changed

+958
-239
lines changed

‎Module 2 - Python for Data Analysis/15. Working with JSON Data/2. Loading JSON to DF /2. json_to_pandas_df.ipynb

Lines changed: 835 additions & 129 deletions
Large diffs are not rendered by default.

‎Module 2 - Python for Data Analysis/15. Working with JSON Data/2. Loading JSON to DF /data/company_data.json

Lines changed: 0 additions & 25 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[
2+
{"id": 1, "name": "Alice", "orders": [
3+
{"order_id": 101, "amount": 250},
4+
{"order_id": 102, "amount": 150}
5+
]},
6+
{"id": 2, "name": "Bob", "orders": [
7+
{"order_id": 103, "amount": 300}
8+
]}
9+
]

‎Module 2 - Python for Data Analysis/15. Working with JSON Data/2. Loading JSON to DF /data/data.json

Lines changed: 0 additions & 16 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[
2+
{"customer": "Alice", "amount": 200, "date": "2024年03月01日"},
3+
{"customer": "Bob", "amount": 150, "date": "2024年03月02日"},
4+
{"customer": "Alice", "amount": 300, "date": "2024年03月05日"},
5+
{"customer": "Charlie", "amount": 500, "date": "2024年03月06日"},
6+
{"customer": "Bob", "amount": 100, "date": "2024年03月07日"}
7+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
[
2+
{
3+
"order_id": "ORD1",
4+
"customer": {
5+
"id": 1639,
6+
"name": "Angela Griffin",
7+
"email": "gibbsedward@example.org",
8+
"address": {
9+
"street": "24026 Darlene Ranch",
10+
"city": "Angelashire",
11+
"country": "Saint Helena"
12+
}
13+
},
14+
"items": [
15+
{
16+
"product_id": 25,
17+
"name": "Mountain Bike",
18+
"category": "Sports",
19+
"price": 599.99,
20+
"quantity": 1
21+
},
22+
{
23+
"product_id": 23,
24+
"name": "Tennis Racket",
25+
"category": "Sports",
26+
"price": 89.99,
27+
"quantity": 2
28+
}
29+
],
30+
"payment": {
31+
"method": "Credit Card",
32+
"transaction_id": "D005B042-A",
33+
"discount_applied": 2.48
34+
}
35+
},
36+
{
37+
"order_id": "ORD2",
38+
"customer": {
39+
"id": 163,
40+
"name": "Sarah Moore",
41+
"email": "zshelton@example.org",
42+
"address": {
43+
"street": "33466 Kristin Meadow Suite 060",
44+
"city": "Lake Brittany",
45+
"country": "Nigeria"
46+
}
47+
},
48+
"items": [
49+
{
50+
"product_id": 24,
51+
"name": "Hydration Backpack for Runners",
52+
"category": "Sports",
53+
"price": 59.99,
54+
"quantity": 1
55+
},
56+
{
57+
"product_id": 21,
58+
"name": "Yoga Mat with Non-Slip Surface",
59+
"category": "Sports",
60+
"price": 39.99,
61+
"quantity": 2
62+
}
63+
],
64+
"payment": {
65+
"method": "Credit Card",
66+
"transaction_id": "C1A2BCA7-1",
67+
"discount_applied": 6.12
68+
}
69+
},
70+
{
71+
"order_id": "ORD3",
72+
"customer": {
73+
"id": 1814,
74+
"name": "Dwayne Hartman",
75+
"email": "daviddyer@example.org",
76+
"address": {
77+
"street": "32036 Rodney Creek",
78+
"city": "New Brandy",
79+
"country": "Sierra Leone"
80+
}
81+
},
82+
"items": [
83+
{
84+
"product_id": 28,
85+
"name": "Noise-Canceling Office Headset",
86+
"category": "Accessories",
87+
"price": 89.99,
88+
"quantity": 1
89+
}
90+
],
91+
"payment": {
92+
"method": "Credit Card",
93+
"transaction_id": "98F4114D-B",
94+
"discount_applied": 5.42
95+
}
96+
}
97+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[
2+
{"id": 1, "name": "Alice", "address": {"city": "New York", "zip": "10001"}},
3+
{"id": 2, "name": "Bob", "address": {"city": "San Francisco", "zip": "94105"}},
4+
{"id": 3, "name": "Charlie", "address": {"city": "Los Angeles", "zip": "90001"}}
5+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[
2+
{"id": 1, "name": "Alice", "skills": ["Python", "SQL", "Machine Learning"]},
3+
{"id": 2, "name": "Bob", "skills": ["Java", "Python"]},
4+
{"id": 3, "name": "Charlie", "skills": ["Python", "JavaScript", "Machine Learning"]}
5+
]

‎Module 2 - Python for Data Analysis/15. Working with JSON Data/2. Loading JSON to DF /data/updated_company_data.json

Lines changed: 0 additions & 53 deletions
This file was deleted.

‎Module 2 - Python for Data Analysis/15. Working with JSON Data/2. Loading JSON to DF /data/updated_data.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /