Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beaker demo "Python API for Table Display" doesn't work #8302

Open
alxcnwy opened this issue Sep 6, 2020 · 2 comments
Open

Beaker demo "Python API for Table Display" doesn't work #8302

alxcnwy opened this issue Sep 6, 2020 · 2 comments

Comments

@alxcnwy
Copy link

alxcnwy commented Sep 6, 2020

I'm evaluating Beaker and the "Python API for Table Display" demo returns the following error on cell 3:


AttributeError Traceback (most recent call last)
in
----> 1 table = TableDisplay(pd.read_csv('../resources/data/interest-rates.csv'))
2 table.setAlignmentProviderForColumn('m3', TableDisplayAlignmentProvider.CENTER_ALIGNMENT)
3 table.setRendererForColumn("y10", TableDisplayCellRenderer.getDataBarsRenderer(False))
4 table.setRendererForType(ColumnType.Double, TableDisplayCellRenderer.getDataBarsRenderer(True))
5 table

/srv/conda/envs/notebook/lib/python3.7/site-packages/beakerx/tabledisplay/tabledisplay.py in init(self, *args, **kwargs)
210 def init(self, *args, **kwargs):
211 super(TableDisplay, self).init(**kwargs)
--> 212 self.chart = Table(*args, **kwargs)
213 self.model = self.chart.transform()
214 self.on_msg(self.handle_msg)

/srv/conda/envs/notebook/lib/python3.7/site-packages/beakerx/tabledisplay/tabledisplay.py in init(self, *args, **kwargs)
33 self.hasIndex = None
34 if isinstance(args[0], DataFrame):
---> 35 self.convert_from_pandas(args, types_map)
36 elif isinstance(args[0], dict):
37 self.convert_from_dict(args)

/srv/conda/envs/notebook/lib/python3.7/site-packages/beakerx/tabledisplay/tabledisplay.py in convert_from_pandas(self, args, types_map)
107 row = []
108 for columnName in self.columnNames:
--> 109 value = args[0][columnName].get_values()[index]
110 value_type = types_map.get(columnName)
111 row.append(self.convert_value(value, value_type))

/srv/conda/envs/notebook/lib/python3.7/site-packages/pandas/core/generic.py in getattr(self, name)
5128 if self._info_axis._can_hold_identifiers_and_holds_name(name):
5129 return self[name]
-> 5130 return object.getattribute(self, name)
5131
5132 def setattr(self, name: str, value) -> None:

AttributeError: 'Series' object has no attribute 'get_values'

@ildipo
Copy link
Collaborator

ildipo commented Sep 27, 2020

Please install latest version of BeakerX

conda install -c beakerx beakerx_all

@jimmybow
Copy link

jimmybow commented Sep 3, 2023

ipywidgets 8 is not surport, please downgrade version to ipywidgets==7.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants