Skip to content

Commit fccccae

Browse files
committed
Change some words in the more functions.
1 parent 3ed4c6c commit fccccae

File tree

6 files changed

+41
-41
lines changed

6 files changed

+41
-41
lines changed

workshops/docs/modules/functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,9 +494,9 @@ create_csvs_by_year(1977, 2002, surveys_df)
494494

495495
## Challenge - More Functions
496496

497-
1. How could you use the function `create_csvs_by_year` to create a CSV file for only one year? (Hint: think about the syntax for range)
497+
1. How could you use the function `create_csvs_by_year` to create a CSV file for only one year ? (Hint: think about the syntax for range)
498498

499-
2. Modify `year_to_csv` so that it has two new arguments, `output_path` (the path of the directory where the files will be written) and `filename_prefix` (a prefix to be added to the start of the file name). Call your new function `year_to_csv_at_path`. Eg, `def year_to_csv_at_path(year, all_data, output_path, filename_prefix):`. Call your new function to create a new file with a different name in a different directory. ... **Hint:** You could manually create the target directory before calling the function using the Collaboratory / Jupyter file browser, *or* for bonus points you could do it in Python inside the function using the `os` module.
499+
2. Modify `year_to_csv` so that it has two additional arguments, `output_path` (the path of the directory where the files will be written) and `filename_prefix` (a prefix to be added to the start of the file name). Name your new function `year_to_csv_at_path`. Eg, `def year_to_csv_at_path(year, all_data, output_path, filename_prefix):`. Call your new function to create a new file with a different name in a different directory. ... **Hint:** You could manually create the target directory before calling the function using the Collaboratory / Jupyter file browser, *or* for bonus points you could do it in Python inside the function using the `os` module.
500500

501501
3. Create a new version of the `create_csvs_by_year` function called `create_csvs_by_year_at_path` that also takes the additional arguments `output_path` and `filename_prefix`. Internally `create_csvs_by_year_at_path` should pass these values to `year_to_csv_at_path`. Call your new function to create a new set of files with a different name in a different directory.
502502

workshops/docs/modules/indexing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ In this lesson, we will explore **ways to access different parts of the data** i
7575
<code class="text">
7676
Requirement already satisfied: pandas in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (0.25.0)
7777
Requirement already satisfied: matplotlib in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (3.1.1)
78-
Requirement already satisfied: pytz>=2017.2 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from pandas) (2019.1)
7978
Requirement already satisfied: python-dateutil>=2.6.1 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from pandas) (2.8.0)
79+
Requirement already satisfied: pytz>=2017.2 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from pandas) (2019.1)
8080
Requirement already satisfied: numpy>=1.13.3 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from pandas) (1.17.0)
81+
Requirement already satisfied: cycler>=0.10 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from matplotlib) (0.10.0)
8182
Requirement already satisfied: kiwisolver>=1.0.1 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from matplotlib) (1.1.0)
8283
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from matplotlib) (2.4.1.1)
83-
Requirement already satisfied: cycler>=0.10 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from matplotlib) (0.10.0)
8484
Requirement already satisfied: six>=1.5 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from python-dateutil>=2.6.1->pandas) (1.12.0)
8585
Requirement already satisfied: setuptools in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib) (39.1.0)
8686

@@ -5135,7 +5135,7 @@ stack_selection.plot(kind='bar', stacked=True)
51355135
<pre class="output">
51365136
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
51375137
<code class="text">
5138-
<matplotlib.axes._subplots.AxesSubplot at 0x117a049e8>
5138+
<matplotlib.axes._subplots.AxesSubplot at 0x112515a20>
51395139
</code>
51405140
</pre>
51415141

workshops/docs/modules/missing_values.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ Before we start, lets make sure the Pandas and matplotlib packages are **install
6666
<code class="text">
6767
Requirement already satisfied: pandas in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (0.25.0)
6868
Requirement already satisfied: matplotlib in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (3.1.1)
69-
Requirement already satisfied: pytz>=2017.2 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from pandas) (2019.1)
7069
Requirement already satisfied: numpy>=1.13.3 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from pandas) (1.17.0)
7170
Requirement already satisfied: python-dateutil>=2.6.1 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from pandas) (2.8.0)
72-
Requirement already satisfied: kiwisolver>=1.0.1 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from matplotlib) (1.1.0)
73-
Requirement already satisfied: cycler>=0.10 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from matplotlib) (0.10.0)
71+
Requirement already satisfied: pytz>=2017.2 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from pandas) (2019.1)
7472
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from matplotlib) (2.4.1.1)
73+
Requirement already satisfied: cycler>=0.10 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from matplotlib) (0.10.0)
74+
Requirement already satisfied: kiwisolver>=1.0.1 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from matplotlib) (1.1.0)
7575
Requirement already satisfied: six>=1.5 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from python-dateutil>=2.6.1->pandas) (1.12.0)
7676
Requirement already satisfied: setuptools in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib) (39.1.0)
7777

workshops/docs/modules/notebooks/functions.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,9 @@
557557
"source": [
558558
"## Challenge - More Functions\n",
559559
"\n",
560-
"1. How could you use the function `create_csvs_by_year` to create a CSV file for only one year? (Hint: think about the syntax for range)\n",
560+
"1. How could you use the function `create_csvs_by_year` to create a CSV file for only one year ? (Hint: think about the syntax for range)\n",
561561
"\n",
562-
"2. Modify `year_to_csv` so that it has two new arguments, `output_path` (the path of the directory where the files will be written) and `filename_prefix` (a prefix to be added to the start of the file name). Call your new function `year_to_csv_at_path`. Eg, `def year_to_csv_at_path(year, all_data, output_path, filename_prefix):`. Call your new function to create a new file with a different name in a different directory. ... **Hint:** You could manually create the target directory before calling the function using the Collaboratory / Jupyter file browser, *or* for bonus points you could do it in Python inside the function using the `os` module.\n",
562+
"2. Modify `year_to_csv` so that it has two additional arguments, `output_path` (the path of the directory where the files will be written) and `filename_prefix` (a prefix to be added to the start of the file name). Name your new function `year_to_csv_at_path`. Eg, `def year_to_csv_at_path(year, all_data, output_path, filename_prefix):`. Call your new function to create a new file with a different name in a different directory. ... **Hint:** You could manually create the target directory before calling the function using the Collaboratory / Jupyter file browser, *or* for bonus points you could do it in Python inside the function using the `os` module.\n",
563563
"\n",
564564
"3. Create a new version of the `create_csvs_by_year` function called `create_csvs_by_year_at_path` that also takes the additional arguments `output_path` and `filename_prefix`. Internally `create_csvs_by_year_at_path` should pass these values to `year_to_csv_at_path`. Call your new function to create a new set of files with a different name in a different directory.\n",
565565
"\n",

workshops/docs/modules/plotting_with_ggplot.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,19 @@ First, install the `pandas` and `plotnine` packages to ensure they are available
8686
<code class="text">
8787
Requirement already satisfied: pandas in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (0.25.0)
8888
Requirement already satisfied: plotnine in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (0.5.1)
89-
Requirement already satisfied: python-dateutil>=2.6.1 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from pandas) (2.8.0)
9089
Requirement already satisfied: numpy>=1.13.3 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from pandas) (1.17.0)
90+
Requirement already satisfied: python-dateutil>=2.6.1 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from pandas) (2.8.0)
9191
Requirement already satisfied: pytz>=2017.2 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from pandas) (2019.1)
92+
Requirement already satisfied: descartes>=1.1.0 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from plotnine) (1.1.0)
9293
Requirement already satisfied: scipy>=1.0.0 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from plotnine) (1.3.0)
94+
Requirement already satisfied: patsy>=0.4.1 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from plotnine) (0.5.1)
9395
Requirement already satisfied: matplotlib>=3.0.0 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from plotnine) (3.1.1)
94-
Requirement already satisfied: descartes>=1.1.0 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from plotnine) (1.1.0)
9596
Requirement already satisfied: statsmodels>=0.8.0 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from plotnine) (0.10.1)
96-
Requirement already satisfied: patsy>=0.4.1 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from plotnine) (0.5.1)
9797
Requirement already satisfied: mizani>=0.5.2 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from plotnine) (0.5.4)
9898
Requirement already satisfied: six>=1.5 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from python-dateutil>=2.6.1->pandas) (1.12.0)
99+
Requirement already satisfied: cycler>=0.10 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from matplotlib>=3.0.0->plotnine) (0.10.0)
99100
Requirement already satisfied: kiwisolver>=1.0.1 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from matplotlib>=3.0.0->plotnine) (1.1.0)
100101
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from matplotlib>=3.0.0->plotnine) (2.4.1.1)
101-
Requirement already satisfied: cycler>=0.10 in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from matplotlib>=3.0.0->plotnine) (0.10.0)
102102
Requirement already satisfied: palettable in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from mizani>=0.5.2->plotnine) (3.2.0)
103103
Requirement already satisfied: setuptools in /Users/perry/.virtualenvs/python-workshop-base-ufuVBSbV/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib>=3.0.0->plotnine) (39.1.0)
104104

@@ -178,7 +178,7 @@ ggplot(survs_df, aes(x='weight', y='hindfoot_length')) + geom_point()
178178
<pre class="output">
179179
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
180180
<code class="text">
181-
<ggplot: (-9223372036585010905)>
181+
<ggplot: (275481864)>
182182
</code>
183183
</pre>
184184

@@ -210,7 +210,7 @@ ggplot(survs_df, aes(x='weight', y='hindfoot_length',
210210
<pre class="output">
211211
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
212212
<code class="text">
213-
<ggplot: (269734597)>
213+
<ggplot: (295313142)>
214214
</code>
215215
</pre>
216216

@@ -242,7 +242,7 @@ ggplot(survs_df, aes(x='weight', y='hindfoot_length',
242242
<pre class="output">
243243
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
244244
<code class="text">
245-
<ggplot: (-9223372036559567479)>
245+
<ggplot: (299641906)>
246246
</code>
247247
</pre>
248248

@@ -277,7 +277,7 @@ ggplot(survs_df, aes(x='year')) + \
277277
<pre class="output">
278278
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
279279
<code class="text">
280-
<ggplot: (-9223372036563203598)>
280+
<ggplot: (274955419)>
281281
</code>
282282
</pre>
283283

@@ -312,7 +312,7 @@ ggplot(survs_df, aes(x='year', fill = 'species_id')) + \
312312
<pre class="output">
313313
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
314314
<code class="text">
315-
<ggplot: (291769748)>
315+
<ggplot: (-9223372036559208532)>
316316
</code>
317317
</pre>
318318

@@ -361,7 +361,7 @@ ggplot(survs_df, aes(x='site_id', fill = 'species_id')) \
361361
<pre class="output">
362362
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
363363
<code class="text">
364-
<ggplot: (294906863)>
364+
<ggplot: (-9223372036559208665)>
365365
</code>
366366
</pre>
367367
@@ -389,7 +389,7 @@ ggplot(survs_df, aes(x='species_id', y='hindfoot_length')) + \
389389
<pre class="output">
390390
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
391391
<code class="text">
392-
<ggplot: (-9223372036563666509)>
392+
<ggplot: (-9223372036558968204)>
393393
</code>
394394
</pre>
395395
@@ -423,7 +423,7 @@ ggplot(survs_df, aes(x='year', y='weight')) + \
423423
<pre class="output">
424424
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
425425
<code class="text">
426-
<ggplot: (-9223372036563338159)>
426+
<ggplot: (-9223372036558968190)>
427427
</code>
428428
</pre>
429429

@@ -458,7 +458,7 @@ ggplot(survs_df, aes(x='year_fact', y='weight')) + \
458458
<pre class="output">
459459
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
460460
<code class="text">
461-
<ggplot: (296571919)>
461+
<ggplot: (-9223372036553754957)>
462462
</code>
463463
</pre>
464464

@@ -491,7 +491,7 @@ ggplot(survs_df, aes(x='year_fact', y='weight')) + \
491491
<pre class="output">
492492
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
493493
<code class="text">
494-
<ggplot: (292036328)>
494+
<ggplot: (-9223372036553653735)>
495495
</code>
496496
</pre>
497497

@@ -533,7 +533,7 @@ ggplot(survs_df, aes(x='year_fact', y='weight')) + \
533533
<pre class="output">
534534
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
535535
<code class="text">
536-
<ggplot: (271090219)>
536+
<ggplot: (301020918)>
537537
</code>
538538
</pre>
539539

@@ -607,7 +607,7 @@ ggplot(survs_df, aes(x='year_fact', y='weight_log')) + \
607607
<pre class="output">
608608
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
609609
<code class="text">
610-
<ggplot: (-9223372036563104873)>
610+
<ggplot: (-9223372036558995035)>
611611
</code>
612612
</pre>
613613
@@ -648,7 +648,7 @@ ggplot(survs_df, aes(x='year_fact', y='weight')) + \
648648
<pre class="output">
649649
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
650650
<code class="text">
651-
<ggplot: (-9223372036562740953)>
651+
<ggplot: (301142420)>
652652
</code>
653653
</pre>
654654

@@ -677,7 +677,7 @@ ggplot(survs_df, aes(x='year_fact', y='weight')) + \
677677
<pre class="output">
678678
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
679679
<code class="text">
680-
<ggplot: (-9223372036559046982)>
680+
<ggplot: (295742412)>
681681
</code>
682682
</pre>
683683

@@ -738,7 +738,7 @@ ggplot(survs_df, aes(x='year_fact', y='weight')) + \
738738
<pre class="output">
739739
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
740740
<code class="text">
741-
<ggplot: (-9223372036574527765)>
741+
<ggplot: (-9223372036580658190)>
742742
</code>
743743
</pre>
744744

@@ -767,7 +767,7 @@ ggplot(survs_df, aes(x='year_fact', y='weight_log')) + \
767767
<pre class="output">
768768
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
769769
<code class="text">
770-
<ggplot: (295922580)>
770+
<ggplot: (-9223372036555930487)>
771771
</code>
772772
</pre>
773773

@@ -820,7 +820,7 @@ plt2
820820
<pre class="output">
821821
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
822822
<code class="text">
823-
<ggplot: (-9223372036577049095)>
823+
<ggplot: (-9223372036554427725)>
824824
</code>
825825
</pre>
826826

@@ -849,7 +849,7 @@ plt2
849849
<pre class="output">
850850
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
851851
<code class="text">
852-
<ggplot: (-9223372036563052565)>
852+
<ggplot: (299804466)>
853853
</code>
854854
</pre>
855855

@@ -894,7 +894,7 @@ ggplot(survs_df, aes("year_fact", "weight_log")) + \
894894
<pre class="output">
895895
<div style="text-align: right; margin: -1em; padding: 0;"><span style="font-size: 0.5em; color: grey">output</span></div>
896896
<code class="text">
897-
<ggplot: (295963028)>
897+
<ggplot: (284801081)>
898898
</code>
899899
</pre>
900900

0 commit comments

Comments
 (0)