Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip
  • Loading branch information
MarcSkovMadsen committed Dec 2, 2022
commit 58c7dd52b08ad25edfb876cc1834024d2e1f0fe8
15 changes: 14 additions & 1 deletion examples/user_guide/Pandas_API.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1172,9 +1172,22 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"pygments_lexer": "ipython3"
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down
14 changes: 13 additions & 1 deletion hvplot/tests/testibis.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,18 @@ def ibis_duckdb_data(df: pd.DataFrame, *args, **kwargs):

return ibis.duckdb.connect(filename).table("df")

@pytest.fixture(params=[pandas_data, ibis_pandas_data, ibis_duckdb_data, ibis_sqlite_data])
class IbisMemConnection(param.Parameterized):
def __init__(self, df):
super().__init__()
self._table = ibis.memtable(df)

def table(self, df):
return self._table

def ibis_mem_table(df: pd.DataFrame, *args, **kwargs):
return IbisMemConnection(df=df)

@pytest.fixture(params=[pandas_data, ibis_pandas_data, ibis_duckdb_data, ibis_sqlite_data, ibis_mem_table])
def data(request, reference_df, tmpdir):
return request.param(reference_df, tmpdir=tmpdir)

Expand All @@ -69,5 +80,6 @@ def test_can_hvplot(xseries, data, backend):
hv.render(plot, backend=backend)

def test_can_hist(data, backend):
"""hist works with Ibis"""
plot = data.hvplot.hist("actual", bins=3)
hv.render(plot, backend=backend)