cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Dataframes with ipywidgets.Output is Adding Unexpected Commas

yhyhy3
New Contributor III

I am currently working in a databricks notebook and using an ipywidgets.Output to display a pandas Dataframe. Because spark.DataFrame cannot be displayed in an ipywidgets.Output widget, I have been using:

import pandas as pd
import numpy as np
import ipywidgets
from IPython.display import display
df = pd.DataFrame(
  np.random.randint(0, 5, size=(4, 4))
)
output = ipywidgets.Output()
with output:
  display(df)

output

This has been working until recently on the 13.2 ML runtime. However, recently, I moved to a different cluster still using the same 13.2 ML runtime and am now getting a bunch of commas prepended to my html output (see screenshot). The larger the dataframe, the longer the number of commas. How can I fix this issue?

1 REPLY 1

cm04
New Contributor III

I have this issue also, and the listed steps do not resolve it.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group