Skip to content

Commit 67fb014

Browse files
committed
Do not convert columns in the dataset categoricals
closes #913
1 parent be1d66f commit 67fb014

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

doc/changelog.qmd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
---
22
title: Changelog
33
---
4+
## v0.15.0
5+
6+
(not-yet-released)
7+
8+
### Enhancements
9+
10+
- Included datasets [](:attr:`~plotnine.data.mpg`), [](:attr:`~plotnine.data.msleep`) and
11+
[](:attr:`~plotnine.data.midwest`) no longer have any of their columns as categoricals.
12+
This matches the respective datasets in R. {{< issue 913 >}}
13+
414
## v0.14.5
515
(2025-01-02)
616
[![](https://zenodo.org/badge/DOI/10.5281/zenodo.14587381.svg)](https://doi.org/10.5281/zenodo.14587381)

plotnine/data/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def _process_categories():
8181
"""
8282
Set columns in some of the dataframes to categoricals
8383
"""
84-
global diamonds, midwest, mpg, msleep, penguins
84+
global diamonds, penguins
8585
diamonds = _ordered_categories(
8686
diamonds,
8787
{
@@ -90,11 +90,6 @@ def _process_categories():
9090
"color": list("DEFGHIJ"),
9191
},
9292
)
93-
mpg = _unordered_categories(
94-
mpg, "manufacturer model trans fl drv class".split()
95-
)
96-
midwest = _unordered_categories(midwest, ["category"])
97-
msleep = _unordered_categories(msleep, ["vore", "conservation"])
9893
penguins = _unordered_categories(penguins, ["species", "island", "sex"])
9994

10095

0 commit comments

Comments
 (0)