From 6d9ebccaa53ba59973c0958bd0fa8f722a83eb7b Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 29 Oct 2024 18:15:50 +0000 Subject: [PATCH] markdown source builds Auto-generated via `{sandpaper}` Source : 829265e2cb9cf67675fce3df1f306f5d5743cb3d Branch : main Author : Tim Dennis Time : 2024-10-29 18:15:07 +0000 Message : Merge pull request #142 from LibraryCarpentry/chennesy-patch-2 Update looping-data-sets.md --- looping-data-sets.md | 1 + md5sum.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/looping-data-sets.md b/looping-data-sets.md index 6c98c183..dbbacdab 100644 --- a/looping-data-sets.md +++ b/looping-data-sets.md @@ -23,6 +23,7 @@ exercises: 10 If you recall from episode 06, the `pd.read_csv()` method takes a text string referencing a filename as an argument. If we have a list of strings that point to our filenames, we can loop through the list to read in each CSV file as a DataFrame. Let's print out the maximum values from the 'ytd' (year to date) column for each DataFrame. ```python +import pandas as pd for filename in ['data/2011_circ.csv', 'data/2012_circ.csv']: data = pd.read_csv(filename) print(filename, data['ytd'].max()) diff --git a/md5sum.txt b/md5sum.txt index 04d1b488..fa043799 100644 --- a/md5sum.txt +++ b/md5sum.txt @@ -9,7 +9,7 @@ "episodes/functions.md" "499deb6ac29cdd4a00134176ef890616" "site/built/functions.md" "2024-06-17" "episodes/libraries.md" "e1ea10719dd52d371c0a5a2bf03f687b" "site/built/libraries.md" "2024-06-17" "episodes/for-loops.md" "a44b90e5f6f451c1659b7f877e0c0c4d" "site/built/for-loops.md" "2024-06-27" -"episodes/looping-data-sets.md" "56880c06991a04425c2cf8fe52ddbede" "site/built/looping-data-sets.md" "2024-06-17" +"episodes/looping-data-sets.md" "ff153b594bf9543fa2ed4890c4d3ef71" "site/built/looping-data-sets.md" "2024-10-29" "episodes/pandas.md" "5f2461a95e56e8aa3aa6851f12d3d566" "site/built/pandas.md" "2024-06-17" "episodes/conditionals.md" "b567ac5270b3dc82c4ed119870a0a890" "site/built/conditionals.md" "2024-06-17" "episodes/writing-functions.md" "99171306646b8b63c66a493acef12e63" "site/built/writing-functions.md" "2024-06-17"