Skip to content

Commit 556593c

Browse files
authored
Add hvplot (#1426)
Recreate of #1424 which got borked This is a plotting library required to do plotting actions from the popular `polars` library.
1 parent 84e11f1 commit 556593c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Dockerfile.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,7 @@ RUN rm -rf /opt/conda/lib/python3.10/site-packages/numpy* && \
484484
s3fs \
485485
gcsfs \
486486
kaggle-environments \
487+
hvplot \
487488
# geopandas > v0.14.4 breaks learn tools
488489
geopandas==v0.14.4 \
489490
"shapely<2" \

tests/test_polars.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
import polars as pl
44

5-
class TestPolars(unittest.TestCase):
5+
class TestPolars(unittest.TestCase):
66
def test_read_csv(self):
7-
data = pl.read_csv("/input/tests/data/train.csv")
7+
data = pl.read_csv('/input/tests/data/train.csv')
88

99
self.assertEqual(100, len(data))
1010

11+
def test_plot(self):
12+
# This relies on the hvplot package
13+
data = pl.read_csv('/input/tests/data/train.csv')
14+
data.plot.line()
15+

0 commit comments

Comments
 (0)