lux-org / lux

Automatically visualize your pandas dataframe via a single print! 📊 💡
Apache License 2.0
5.15k stars 365 forks source link

[Issue] Using lux on Databricks #476

Open pbezz1 opened 2 years ago

pbezz1 commented 2 years ago

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 _ipythondisplay 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

dorisjlee commented 2 years ago

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?

pbezz1 commented 2 years ago

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.

dorisjlee commented 2 years ago

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.