question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bucket: NotImplementedError: Could not find signature for execute_node: <Bucket, Series, tuple, bool, bool, bool>

See original GitHub issue

What happened?

I’m trying to see if I can get the support for Ibis working in hvPlot and HoloViews. Right now for histograms.

Running some code I see NotImplementedError: Could not find signature for execute_node: <Bucket, Series, tuple, bool, bool, bool>.

I’ve reduced it to this small example

import ibis
import pandas as pd

df = pd.DataFrame({
    "y": [1,2,3,4,5]
})
con = ibis.pandas.connect({"df": df})
table = con.table("df")
bins=[1.0,3.0,5.0]
expr=table
expr=expr.y
expr.bucket(bins).execute()

What version of ibis are you using?

3.2.0

What backend(s) are you using, if any?

Pandas.

My problem started with duckDB though. But the example above was just simpler to provide.

Relevant log output

$ python script3.py
Traceback (most recent call last):
  File "C:\repos\private\hvplot\.venv\lib\site-packages\multipledispatch\dispatcher.py", line 269, in __call__
    func = self._cache[types]
KeyError: (<class 'ibis.expr.operations.histograms.Bucket'>, <class 'pandas.core.series.Series'>, <class 'tuple'>, <class 'bool'>, <class 'bool'>, <class 'bool'>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\repos\private\hvplot\script3.py", line 12, in <module>
    expr.bucket(bins).execute()
  File "C:\repos\private\hvplot\.venv\lib\site-packages\ibis\expr\types\core.py", line 291, in execute
    return self._find_backend(use_default=True).execute(
  File "C:\repos\private\hvplot\.venv\lib\site-packages\ibis\backends\pandas\__init__.py", line 216, in execute
    return execute_and_reset(query, params=params, **kwargs)
  File "C:\repos\private\hvplot\.venv\lib\site-packages\ibis\backends\pandas\core.py", line 491, in execute_and_reset
    result = execute(
  File "C:\repos\private\hvplot\.venv\lib\site-packages\multipledispatch\dispatcher.py", line 278, in __call__
    return func(*args, **kwargs)
  File "C:\repos\private\hvplot\.venv\lib\site-packages\ibis\backends\pandas\trace.py", line 137, in traced_func
    return func(*args, **kwargs)
  File "C:\repos\private\hvplot\.venv\lib\site-packages\ibis\backends\pandas\core.py", line 436, in main_execute
    return execute_with_scope(
  File "C:\repos\private\hvplot\.venv\lib\site-packages\ibis\backends\pandas\core.py", line 222, in execute_with_scope
    result = execute_until_in_scope(
  File "C:\repos\private\hvplot\.venv\lib\site-packages\ibis\backends\pandas\trace.py", line 137, in traced_func
    return func(*args, **kwargs)
  File "C:\repos\private\hvplot\.venv\lib\site-packages\ibis\backends\pandas\core.py", line 363, in execute_until_in_scope
    result = execute_node(
  File "C:\repos\private\hvplot\.venv\lib\site-packages\multipledispatch\dispatcher.py", line 273, in __call__
    raise NotImplementedError(
NotImplementedError: Could not find signature for execute_node: <Bucket, Series, tuple, bool, bool, bool>

Code of Conduct

  • I agree to follow this project’s Code of Conduct

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
gforsythcommented, Dec 2, 2022

Ok, so given that, I think that you can probably “just” offer duckdb and sqlite to start. A user might have data in an existing sqlite db, or an existing duckdb file, but there isn’t a pandas representation on disk, and any stored data they might want to load (like a csv or a parquet dataset) can be loaded in duckdb instead.

Short of the situation where you have existing data in a specific on-disk format, I don’t think there’s any benefit to using a local backend that isn’t duckdb – it’s far and away the most performant (of the three above) and there are fast paths from DuckDB to arrow.

1reaction
gforsythcommented, Dec 1, 2022

Hey @MarcSkovMadsen – the workaround in #4940 is specific to the (probable) bug in DuckDB – it won’t help with the lack of implementation in the pandas backend.

I understand wanting to offer users the ability to choose any backend so that whatever data the user brings, they can make use of holoviews.

In the case of pandas dataframes, you aren’t limited to the pandas backend because there is an option to create a memtable, which loads an in-memory dataframe into duckdb.

[ins] In [1]: import pandas as pd

[ins] In [2]: df = pd.DataFrame(
         ...:     {
         ...:         "value": [1, 2, 3, 4, 5],
         ...:         "group": ["a", "b", "b", "b", "a"],
         ...:     }
         ...: )

[ins] In [3]: import ibis

[ins] In [4]: con = ibis.memtable(df)

[ins] In [5]: con
Out[5]: 
PandasInMemoryTable
  data:
    DataFrameProxy:
         value group
      0      1     a
      1      2     b
      2      3     b
      3      4     b
      4      5     a
Read more comments on GitHub >

github_iconTop Results From Across the Web

Tuple<ThisThing, bool> parameter for OnNavigatedToAsync ...
The issue here is that C# 7.0 tuples are not System.Tuple , they're System.ValueTuple . So the correct cast is:
Read more >
tensorflow.csv - Github-Gist
We can't make this file beautiful and searchable because it's too large. commit,author_name,time_sec,subject,files_changed,lines_inserted,lines_deleted.
Read more >
All Problems Tagged With Whatever - Code Grepper
Get code examples instantly right from your google search results with the ... bucket is inplace or not · @Override public boolean on...
Read more >
Python all() Function - Initial Commit
Let's use Python's bool() built-in function to determine which boolean value is given to certain common objects. >>> bool(True) True >>> ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found