Skip to content

Commit 7307a5d

Browse files
committed
markdown source builds
Auto-generated via {sandpaper} Source : eb6ebdd Branch : main Author : Tim Dennis <tdennis@library.ucla.edu> Time : 2024-10-07 14:58:45 +0000 Message : Merge pull request #139 from LibraryCarpentry/pandas_bug add pandas bug note
1 parent 3fce9c3 commit 7307a5d

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎data-visualisation.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ df_long.head()
4747

4848
Ok! We are now ready to plot our data. Since this data is monthly data, we can plot the circulation data over time.
4949

50+
::::::::::::::::::::::::::::::::::::: instructor
51+
## Instructor note: Pandas 2.2.* bug
52+
There is a bug in the latest release of Pandas that is causing certain plots to display in a garbled manner. This is a [known issue](https://github.com/pandas-dev/pandas/issues/59960) that the Pandas team plans to address. In the meantime, learners and instructors can user older versions of pandas *or* add `.sort_index()` before any instance of `.plot()`. For example, use `albany['circulation'].sort_index().plot()` instead of `albany['circulation'].plot()`.
53+
:::::::::::::::::::::::::::::::::::::::::::::::::
54+
5055
At first, let’s focus on a specific branch. We can select the rows for the Albany Park branch:
5156

5257
``` python
@@ -66,6 +71,7 @@ albany.head()
6671
| 2014-01-01 | Albany Park | 5150 N. Kimball Ave. | Chicago | 60625.0 | 50484 | 2014 | january | 35 |
6772
| 2015-01-01 | Albany Park | NaN | NaN | NaN | 133366 | 2015 | january | 10889 |
6873

74+
6975
Now we can use the `plot()` function that is built in to pandas. Let’s try it:
7076

7177
``` python

‎md5sum.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"episodes/conditionals.md" "b567ac5270b3dc82c4ed119870a0a890" "site/built/conditionals.md" "2024-06-17"
1515
"episodes/writing-functions.md" "99171306646b8b63c66a493acef12e63" "site/built/writing-functions.md" "2024-06-17"
1616
"episodes/tidy.md" "03e41c4d6c93d0b4b1ea4b2ea0c17522" "site/built/tidy.md" "2024-06-27"
17-
"episodes/data-visualisation.md" "c41a824e8c87e522965fe01ce390ec6a" "site/built/data-visualisation.md" "2024-06-17"
17+
"episodes/data-visualisation.md" "c0f8a792ea7b637a782ee67879d5f34f" "site/built/data-visualisation.md" "2024-10-07"
1818
"episodes/wrap.md" "6e2c8fe8bab006ad451a481d27982d06" "site/built/wrap.md" "2024-06-17"
1919
"instructors/design.md" "644a2269c636c2de465fe655b899a508" "site/built/design.md" "2023-05-08"
2020
"instructors/instructor-notes.md" "62646361a3b355df21da3707168fee01" "site/built/instructor-notes.md" "2023-05-08"

0 commit comments

Comments
 (0)