Skip to content

Commit 0837162

Browse files
authored
Merge pull request #13 from Azaya89/fix-cycling
Fix unnamed index column in cycling dataset
2 parents 4ec8ede + 84813c8 commit 0837162

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/bokeh_sampledata/cycling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131

3232
def _read_data() -> pd.DataFrame:
33-
df = package_csv("cycling.csv")
33+
df = package_csv("cycling.csv", index_col=0)
3434
df["time"] = pd.to_timedelta(df["time"])
3535
return df
3636

tests/unit/bokeh_sampledata/test_cycling.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,14 @@ def test_cycling() -> None:
2121
assert isinstance(c.cycling, pd.DataFrame)
2222

2323
assert len(c.cycling) == 4391
24+
expected_columns = {
25+
"position_lat",
26+
"position_long",
27+
"altitude",
28+
"power",
29+
"cadence",
30+
"distance",
31+
"speed",
32+
"time",
33+
}
34+
assert set(c.cycling.columns) == expected_columns

0 commit comments

Comments
 (0)