Skip to content

Commit 2e2641b

Browse files
committed
Add Schema Evolution tutorial
1 parent 69894a2 commit 2e2641b

File tree

7 files changed

+470
-58
lines changed

7 files changed

+470
-58
lines changed

tutorials/01 - Introduction.ipynb

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,16 @@
6969
},
7070
{
7171
"cell_type": "code",
72-
"execution_count": 2,
72+
"execution_count": 1,
7373
"metadata": {},
7474
"outputs": [
7575
{
7676
"data": {
7777
"text/plain": [
78-
"'1.0.2'"
78+
"'1.2.0'"
7979
]
8080
},
81-
"execution_count": 2,
81+
"execution_count": 1,
8282
"metadata": {},
8383
"output_type": "execute_result"
8484
}
@@ -88,6 +88,13 @@
8888
"\n",
8989
"wr.__version__"
9090
]
91+
},
92+
{
93+
"cell_type": "code",
94+
"execution_count": null,
95+
"metadata": {},
96+
"outputs": [],
97+
"source": []
9198
}
9299
],
93100
"metadata": {

tutorials/02 - Sessions.ipynb

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -90,38 +90,23 @@
9090
},
9191
{
9292
"cell_type": "markdown",
93+
"metadata": {},
9394
"source": [
9495
"## Using a new custom Session"
95-
],
96-
"metadata": {
97-
"collapsed": false
98-
}
96+
]
9997
},
10098
{
10199
"cell_type": "code",
102-
"execution_count": null,
103-
"outputs": [],
104-
"source": [
105-
"my_session = boto3.Session(region_name=\"us-east-2\")\n",
106-
"\n",
107-
"wr.s3.does_object_exist(\"s3://noaa-ghcn-pds/fake\", boto3_session=my_session)"
108-
],
100+
"execution_count": 4,
109101
"metadata": {
110102
"collapsed": false,
103+
"jupyter": {
104+
"outputs_hidden": false
105+
},
111106
"pycharm": {
112107
"name": "#%%\n"
113108
}
114-
}
115-
},
116-
{
117-
"cell_type": "markdown",
118-
"metadata": {},
119-
"source": []
120-
},
121-
{
122-
"cell_type": "code",
123-
"execution_count": 4,
124-
"metadata": {},
109+
},
125110
"outputs": [
126111
{
127112
"data": {
@@ -142,17 +127,32 @@
142127
},
143128
{
144129
"cell_type": "code",
145-
"execution_count": null,
130+
"execution_count": 5,
146131
"metadata": {},
147-
"outputs": [],
148-
"source": []
132+
"outputs": [
133+
{
134+
"data": {
135+
"text/plain": [
136+
"False"
137+
]
138+
},
139+
"execution_count": 5,
140+
"metadata": {},
141+
"output_type": "execute_result"
142+
}
143+
],
144+
"source": [
145+
"my_session = boto3.Session(region_name=\"us-east-2\")\n",
146+
"\n",
147+
"wr.s3.does_object_exist(\"s3://noaa-ghcn-pds/fake\", boto3_session=my_session)"
148+
]
149149
}
150150
],
151151
"metadata": {
152152
"kernelspec": {
153-
"display_name": "Python 3",
153+
"display_name": "conda_python3",
154154
"language": "python",
155-
"name": "python3"
155+
"name": "conda_python3"
156156
},
157157
"language_info": {
158158
"codemirror_mode": {
@@ -164,9 +164,9 @@
164164
"name": "python",
165165
"nbconvert_exporter": "python",
166166
"pygments_lexer": "ipython3",
167-
"version": "3.6.10"
167+
"version": "3.6.5"
168168
}
169169
},
170170
"nbformat": 4,
171171
"nbformat_minor": 4
172-
}
172+
}

tutorials/03 - Amazon S3.ipynb

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"name": "stdin",
8383
"output_type": "stream",
8484
"text": [
85-
" ··········································\n"
85+
" ············\n"
8686
]
8787
}
8888
],
@@ -109,25 +109,13 @@
109109
"cell_type": "code",
110110
"execution_count": 3,
111111
"metadata": {},
112-
"outputs": [
113-
{
114-
"data": {
115-
"text/plain": [
116-
"{'paths': ['s3://aws-data-wrangler-test-bucket-ql9ou148dw6r/csv/file2.csv'],\n",
117-
" 'partitions_values': {}}"
118-
]
119-
},
120-
"execution_count": 3,
121-
"metadata": {},
122-
"output_type": "execute_result"
123-
}
124-
],
112+
"outputs": [],
125113
"source": [
126114
"path1 = f\"s3://{bucket}/csv/file1.csv\"\n",
127115
"path2 = f\"s3://{bucket}/csv/file2.csv\"\n",
128116
"\n",
129117
"wr.s3.to_csv(df1, path1, index=False)\n",
130-
"wr.s3.to_csv(df2, path2, index=False)"
118+
"wr.s3.to_csv(df2, path2, index=False);"
131119
]
132120
},
133121
{

tutorials/04 - Parquet Datasets.ipynb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"name": "stdin",
5151
"output_type": "stream",
5252
"text": [
53-
" ··········································\n"
53+
" ············\n"
5454
]
5555
}
5656
],
@@ -184,31 +184,31 @@
184184
" <tbody>\n",
185185
" <tr>\n",
186186
" <th>0</th>\n",
187-
" <td>3</td>\n",
188-
" <td>bar</td>\n",
189-
" <td>2020-01-03</td>\n",
190-
" </tr>\n",
191-
" <tr>\n",
192-
" <th>1</th>\n",
193187
" <td>1</td>\n",
194188
" <td>foo</td>\n",
195189
" <td>2020-01-01</td>\n",
196190
" </tr>\n",
197191
" <tr>\n",
198-
" <th>2</th>\n",
192+
" <th>1</th>\n",
199193
" <td>2</td>\n",
200194
" <td>boo</td>\n",
201195
" <td>2020-01-02</td>\n",
202196
" </tr>\n",
197+
" <tr>\n",
198+
" <th>2</th>\n",
199+
" <td>3</td>\n",
200+
" <td>bar</td>\n",
201+
" <td>2020-01-03</td>\n",
202+
" </tr>\n",
203203
" </tbody>\n",
204204
"</table>\n",
205205
"</div>"
206206
],
207207
"text/plain": [
208208
" id value date\n",
209-
"0 3 bar 2020-01-03\n",
210-
"1 1 foo 2020-01-01\n",
211-
"2 2 boo 2020-01-02"
209+
"0 1 foo 2020-01-01\n",
210+
"1 2 boo 2020-01-02\n",
211+
"2 3 bar 2020-01-03"
212212
]
213213
},
214214
"execution_count": 4,

0 commit comments

Comments
 (0)