Skip to content

Commit 4b8d288

Browse files
committed
Update advanced notebooks
Fix typos
1 parent dab347e commit 4b8d288

18 files changed

+658
-670
lines changed

2_Advanced/01_Pandas_Accessing_Data.ipynb

Lines changed: 579 additions & 591 deletions
Large diffs are not rendered by default.

2_Advanced/02_Pandas_Data_Cleaning.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"\n",
130130
"#### Notes\n",
131131
"\n",
132-
"- `df.fillna()`: Fill missing values.\n",
132+
"- `df.fillna()`: Fill missing values\n",
133133
"\n",
134134
"#### Examples\n",
135135
"\n",

2_Advanced/03_Pandas_Data_Management.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"cell_type": "markdown",
9898
"metadata": {},
9999
"source": [
100-
"Let's fill in missing values with the median value"
100+
"Let's fill in missing values with the median value."
101101
]
102102
},
103103
{
@@ -126,7 +126,7 @@
126126
"cell_type": "markdown",
127127
"metadata": {},
128128
"source": [
129-
"Now let's inspect the altered dataframe."
129+
"Now let's inspect the altered DataFrame."
130130
]
131131
},
132132
{
@@ -201,7 +201,7 @@
201201
"cell_type": "markdown",
202202
"metadata": {},
203203
"source": [
204-
"Well both the variables of `df_original` and `df_altered` are referencing the same dataframe."
204+
"Well both the variables of `df_original` and `df_altered` are referencing the same DataFrame."
205205
]
206206
},
207207
{

2_Advanced/05_Pandas_Index_Management.ipynb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"cell_type": "markdown",
6363
"metadata": {},
6464
"source": [
65-
"Let's look at our dataframe:"
65+
"Let's look at our DataFrame."
6666
]
6767
},
6868
{
@@ -225,7 +225,7 @@
225225
"cell_type": "markdown",
226226
"metadata": {},
227227
"source": [
228-
"Let's inspect our index"
228+
"Let's inspect our index."
229229
]
230230
},
231231
{
@@ -288,7 +288,7 @@
288288
"cell_type": "markdown",
289289
"metadata": {},
290290
"source": [
291-
"It has no name... so let's name it"
291+
"It has no name... so let's name it."
292292
]
293293
},
294294
{
@@ -304,7 +304,7 @@
304304
"cell_type": "markdown",
305305
"metadata": {},
306306
"source": [
307-
"Inspecting it"
307+
"Inspecting it."
308308
]
309309
},
310310
{
@@ -958,7 +958,7 @@
958958
"cell_type": "markdown",
959959
"metadata": {},
960960
"source": [
961-
"Index is no longer correctly spaced by 1 increment"
961+
"Index is no longer correctly spaced by 1 increment."
962962
]
963963
},
964964
{
@@ -1189,9 +1189,9 @@
11891189
"cell_type": "markdown",
11901190
"metadata": {},
11911191
"source": [
1192-
"Technically we could `.drop()` the `job_index`\n",
1192+
"Technically we could `.drop()` the `job_index`.\n",
11931193
"\n",
1194-
"BUT, if we wanted to do some sort of merge operations in the future with our original dataframe, this provides the unique id to do that"
1194+
"BUT, if we wanted to do some sort of merge operations in the future with our original DataFrame, this provides the unique `id` to do that."
11951195
]
11961196
},
11971197
{
@@ -1691,7 +1691,7 @@
16911691
"\n",
16921692
"### Notes \n",
16931693
"\n",
1694-
"* `sort_index()`: Sorts the DataFrame by the index (row labels), either ascending or descending. This helps in quickly organizing data by the index and is often used after set_index()."
1694+
"* `sort_index()`: Sorts the DataFrame by the index (row labels), either ascending or descending. This helps in quickly organizing data by the index and is often used after `set_index()`."
16951695
]
16961696
},
16971697
{
@@ -1700,7 +1700,7 @@
17001700
"source": [
17011701
"### Example\n",
17021702
"\n",
1703-
"Back to our pivoted dataframe let's sort this new index alphabetically"
1703+
"Back to our pivoted DataFrame let's sort this new index alphabetically."
17041704
]
17051705
},
17061706
{

2_Advanced/06_Exercise_Job_Demand.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@
406406
"cell_type": "markdown",
407407
"metadata": {},
408408
"source": [
409-
"4. Let's sort this"
409+
"4. Let's sort this."
410410
]
411411
},
412412
{
@@ -747,7 +747,7 @@
747747
"cell_type": "markdown",
748748
"metadata": {},
749749
"source": [
750-
"Instead we'll just focus on the top 3 roles"
750+
"Instead we'll just focus on the top 3 roles."
751751
]
752752
},
753753
{

2_Advanced/07_Pandas_Merge_DataFrames.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"## Notes\n",
5555
"\n",
5656
"* `merge()`: Combine DataFrames based on common columns or indices, similar to SQL joins (inner, outer, left, right).\n",
57-
"* It merges rows from the DataFrame based on the specific keys\n",
57+
"* It merges rows from the DataFrame based on the specific keys.\n",
5858
"\n",
5959
"## Examples"
6060
]
@@ -65,8 +65,8 @@
6565
"source": [
6666
"### Example 1\n",
6767
"\n",
68-
"We need to combine two dataframes:\n",
69-
"- `df_jobs` has info similiar to our `df` dataframe\n",
68+
"We need to combine two DataFrames:\n",
69+
"- `df_jobs` has info similiar to our `df` DataFrame\n",
7070
"- `df_companies` has company info"
7171
]
7272
},
@@ -687,9 +687,9 @@
687687
"cell_type": "markdown",
688688
"metadata": {},
689689
"source": [
690-
"Let's make some fake data for this\n",
690+
"Let's make some fake data for this.\n",
691691
"\n",
692-
"**NOTE: The code here is not important for you to understand**"
692+
"**NOTE: The code here is not important for you to understand**."
693693
]
694694
},
695695
{

2_Advanced/08_Pandas_Concat_DataFrames.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@
873873
"cell_type": "markdown",
874874
"metadata": {},
875875
"source": [
876-
"3. Concatenate the first quarter"
876+
"3. Concatenate the first quarter."
877877
]
878878
},
879879
{
@@ -1297,7 +1297,7 @@
12971297
"cell_type": "markdown",
12981298
"metadata": {},
12991299
"source": [
1300-
"4. Inspecting to confirm"
1300+
"4. Inspecting to confirm."
13011301
]
13021302
},
13031303
{

2_Advanced/09_Pandas_Exporting_Data.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@
254254
"cell_type": "markdown",
255255
"metadata": {},
256256
"source": [
257-
"Another popular form to export to for your non code savy friends is to excel:"
257+
"Another popular form to export to for your non code savy friends is to Excel:"
258258
]
259259
},
260260
{
@@ -759,7 +759,7 @@
759759
"cell_type": "markdown",
760760
"metadata": {},
761761
"source": [
762-
"Now we can save our jobs to a csv"
762+
"Now we can save our jobs to a csv."
763763
]
764764
},
765765
{

2_Advanced/10_Pandas_Applying_Functions.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@
265265
"source": [
266266
"### Example 1\n",
267267
"\n",
268-
"Calculate projected salaries next year, using an assumed rate of 3.0% for all roles"
268+
"Calculate projected salaries next year, using an assumed rate of 3.0% for all roles."
269269
]
270270
},
271271
{
@@ -394,7 +394,7 @@
394394
"cell_type": "markdown",
395395
"metadata": {},
396396
"source": [
397-
"We can actually simplify this with a lambda function"
397+
"We can actually simplify this with a lambda function."
398398
]
399399
},
400400
{
@@ -1021,7 +1021,7 @@
10211021
"cell_type": "markdown",
10221022
"metadata": {},
10231023
"source": [
1024-
"Let's look at the `literal_eval()` fucntion from the Python Standard Library `ast` module"
1024+
"Let's look at the `literal_eval()` function from the Python Standard Library `ast` module."
10251025
]
10261026
},
10271027
{

2_Advanced/11_Pandas_Explode.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@
668668
"cell_type": "markdown",
669669
"metadata": {},
670670
"source": [
671-
"3. We'll `reset_index` to transform skills_count from a Series to a DataFrame"
671+
"3. We'll `reset_index` to transform skills_count from a Series to a DataFrame."
672672
]
673673
},
674674
{
@@ -783,7 +783,7 @@
783783
"cell_type": "markdown",
784784
"metadata": {},
785785
"source": [
786-
"4. We'll prep for plotting by the data getting in descending order"
786+
"4. We'll prep for plotting by the data getting in descending order."
787787
]
788788
},
789789
{

2_Advanced/12_Exercise_Trending_Skills.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"cell_type": "markdown",
109109
"metadata": {},
110110
"source": [
111-
"3. Explode the `job_skills` column"
111+
"3. Explode the `job_skills` column."
112112
]
113113
},
114114
{
@@ -1012,7 +1012,7 @@
10121012
"cell_type": "markdown",
10131013
"metadata": {},
10141014
"source": [
1015-
"5. (Optional) I like to have my months as names, not numbers, so let's change this"
1015+
"5. (Optional) I like to have my months as names, not numbers, so let's change this."
10161016
]
10171017
},
10181018
{
@@ -1451,7 +1451,7 @@
14511451
"cell_type": "markdown",
14521452
"metadata": {},
14531453
"source": [
1454-
"6. Let's graph the top 5 skills by count"
1454+
"6. Let's graph the top 5 skills by count."
14551455
]
14561456
},
14571457
{

2_Advanced/13_Matplotlib_Format_Charts.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
"\n",
6767
"* `subplots()`: Create multiple plots within a single figure. \n",
6868
"* Returns two objects: \n",
69-
" 1. `fig` - represents the entire figure window that will contain all of the subplots\n",
70-
" 2. `ax` - either a single axis object (for a single subplot) or an array of axis objects (for multiple subplots)\n",
69+
" 1. `fig` - represents the entire figure window that will contain all the subplots.\n",
70+
" 2. `ax` - either a single axis object (for a single subplot) or an array of axis objects (for multiple subplots).\n",
7171
"* Arguments:\n",
7272
" * `nrows` and `ncols` determine the number of rows and columns of subplots, respectively.\n",
7373
" * `sharex` and `sharey` control whether the x-axes or y-axes should be shared among subplots.\n",
@@ -104,7 +104,7 @@
104104
"cell_type": "markdown",
105105
"metadata": {},
106106
"source": [
107-
"Let's add two plots"
107+
"Let's add two plots."
108108
]
109109
},
110110
{
@@ -139,7 +139,7 @@
139139
"cell_type": "markdown",
140140
"metadata": {},
141141
"source": [
142-
"Alternatively, we can plot how Matplotlib intended"
142+
"Alternatively, we can plot how Matplotlib intended."
143143
]
144144
},
145145
{
@@ -175,9 +175,9 @@
175175
"source": [
176176
"### Examples\n",
177177
"\n",
178-
"Create a subplot that displays individual bar charts for each `job_title_short` from the DataFrame we created in `11_Pandas_Explode`\n",
178+
"Create a subplot that displays individual bar charts for each `job_title_short` from the DataFrame we created in `11_Pandas_Explode`.\n",
179179
"\n",
180-
"Note: This DataFrame \n",
180+
"Note: This DataFrame.\n",
181181
"\n",
182182
"Here's the code from our last exercise:"
183183
]
@@ -352,7 +352,7 @@
352352
"cell_type": "markdown",
353353
"metadata": {},
354354
"source": [
355-
"Plot these top jobs on the same plot"
355+
"Plot these top jobs on the same plot."
356356
]
357357
},
358358
{

2_Advanced/15_Matplotlib_Scatter_Plots.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,13 @@
248248
"* `text`: Add text annotations to the plot.\n",
249249
"\n",
250250
"#### Common Arguments\n",
251-
"* `x`: The x-coordinate for the text.\n",
252-
"* `y`: The y-coordinate for the text.\n",
253-
"* `s`: The text to display.\n",
254-
"* `fontsize`: The font size of the text.\n",
255-
"* `color`: The color of the text.\n",
256-
"* `ha`: Horizontal alignment of the text.\n",
257-
"* `va`: Vertical alignment of the text."
251+
"* `x`: The x-coordinate for the text\n",
252+
"* `y`: The y-coordinate for the text\n",
253+
"* `s`: The text to display\n",
254+
"* `fontsize`: The font size of the text\n",
255+
"* `color`: The color of the text\n",
256+
"* `ha`: Horizontal alignment of the text\n",
257+
"* `va`: Vertical alignment of the text"
258258
]
259259
},
260260
{

0 commit comments

Comments
 (0)