Skip to content

Commit

Permalink
Add hvplot (#1426)
Browse files Browse the repository at this point in the history
Recreate of #1424 which got
borked

This is a plotting library required to do plotting actions from the
popular `polars` library.
  • Loading branch information
dster2 authored Sep 27, 2024
1 parent 84e11f1 commit 556593c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ RUN rm -rf /opt/conda/lib/python3.10/site-packages/numpy* && \
s3fs \
gcsfs \
kaggle-environments \
hvplot \
# geopandas > v0.14.4 breaks learn tools
geopandas==v0.14.4 \
"shapely<2" \
Expand Down
9 changes: 7 additions & 2 deletions tests/test_polars.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

import polars as pl

class TestPolars(unittest.TestCase):
class TestPolars(unittest.TestCase):
def test_read_csv(self):
data = pl.read_csv("/input/tests/data/train.csv")
data = pl.read_csv('/input/tests/data/train.csv')

self.assertEqual(100, len(data))

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

0 comments on commit 556593c

Please sign in to comment.