lux icon indicating copy to clipboard operation
lux copied to clipboard

[Issue] Using lux on Databricks

Open pbezz1 opened this issue 2 years ago • 3 comments

I'm trying to use the lux library in a Databricks notebook but I'm getting this warning and error after the df.intent statment:

Out[10]: /databricks/python/lib/python3.8/site-packages/IPython/core/formatters.py:918: UserWarning: Unexpected error in rendering Lux widget and recommendations. Falling back to Pandas display. Please report the following issue on Github: https://github.com/lux-org/lux/issues

/databricks/python/lib/python3.8/site-packages/lux/core/frame.py:632: UserWarning:Traceback (most recent call last): File "/databricks/python/lib/python3.8/site-packages/lux/core/frame.py", line 594, in ipython_display self.maintain_recs() File "/databricks/python/lib/python3.8/site-packages/lux/core/frame.py", line 451, in maintain_recs self._widget = rec_df.render_widget() File "/databricks/python/lib/python3.8/site-packages/lux/core/frame.py", line 681, in render_widget widgetJSON = self.to_JSON(self._rec_info, input_current_vis=input_current_vis) File "/databricks/python/lib/python3.8/site-packages/lux/core/frame.py", line 713, in to_JSON widget_spec["current_vis"] = LuxDataFrame.current_vis_to_JSON( File "/databricks/python/lib/python3.8/site-packages/lux/core/frame.py", line 736, in current_vis_to_JSON current_vis_spec["allcols"] = False TypeError: 'NoneType' object does not support item assignment

pbezz1 avatar May 02 '22 07:05 pbezz1

Hi @pbezz1, Thank you for reporting this issue! Could you share the code and data you used to help us reproduce and debug this issue?

dorisjlee avatar May 02 '22 16:05 dorisjlee

In a Databricks environment:

  1. create a new notebook
  2. Enter the following script:

!pip install lux

import pandas as pd import lux

Load dataset

df = pd.read_csv("data/abcdefg.csv")

df.intent = ['col1','col2'] df

The above error is shown.

pbezz1 avatar May 03 '22 06:05 pbezz1

Hi @pbezz1, What does the data/abcdefg.csv look like? Do you mind sending a sample? I believe this is an issue that is caused by Lux based on the dataset, but not something specific to Databricks.

dorisjlee avatar May 13 '22 23:05 dorisjlee