cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

docs.azure.cn

THIAM_HUATTAN
Valued Contributor

https://docs.azure.cn/en-us/databricks/_static/notebooks/mlflow/mlflow-end-to-end-example-azure.html

I imported the above notebook and try in Databricks community, but those subplots for Box plots are giving me errors as below:

AttributeError Traceback (most recent call last)

<command-1592399853593578> in <module>

8 if col == 'is_red' or col == 'quality':

9 continue # Box plots cannot be used on indicator variables

---> 10 sns.boxplot(x=high_quality, y=data[col], ax=axes[axis_i, axis_j])

11 axis_j += 1

12 if axis_j == dims[1]:

/databricks/python/lib/python3.8/site-packages/seaborn/_decorators.py in inner_f(*args, **kwargs)

44 )

45 kwargs.update({k: arg for k, arg in zip(sig.parameters, args)})

---> 46 return f(**kwargs)

47 return inner_f

48

/databricks/python/lib/python3.8/site-packages/seaborn/categorical.py in boxplot(x, y, hue, data, order, hue_order, orient, color, palette, saturation, width, dodge, fliersize, linewidth, whis, ax, **kwargs)

2238 😞

2239

-> 2240 plotter = _BoxPlotter(x, y, hue, data, order, hue_order,

2241 orient, color, palette, saturation,

2242 width, dodge, fliersize, linewidth)

/databricks/python/lib/python3.8/site-packages/seaborn/categorical.py in __init__(self, x, y, hue, data, order, hue_order, orient, color, palette, saturation, width, dodge, fliersize, linewidth)

404 width, dodge, fliersize, linewidth):

405

--> 406 self.establish_variables(x, y, hue, data, orient, order, hue_order)

407 self.establish_colors(color, palette, saturation)

408

/databricks/python/lib/python3.8/site-packages/seaborn/categorical.py in establish_variables(self, x, y, hue, data, orient, order, hue_order, units)

154

155 # Figure out the plotting orientation

--> 156 orient = infer_orient(

157 x, y, orient, require_numeric=self.require_numeric

158 )

/databricks/python/lib/python3.8/site-packages/seaborn/_core.py in infer_orient(x, y, orient, require_numeric)

1302 """

1303

-> 1304 x_type = None if x is None else variable_type(x)

1305 y_type = None if y is None else variable_type(y)

1306

/databricks/python/lib/python3.8/site-packages/seaborn/_core.py in variable_type(vector, boolean_type)

1220

1221 # Special-case all-na data, which is always "numeric"

-> 1222 if pd.isna(vector).all():

1223 return "numeric"

1224

AttributeError: 'bool' object has no attribute 'all'

However, when I run the same identical code in Spyder in my standalone PC, it gives those subplots of Box-plots perfectly. What are the causes of it? Python version?

0 REPLIES 0

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now