ricardo_portill
Databricks Employee
Databricks Employee

Hi @sdaza,

The display command can be used to visualize Spark data frames or image objects but not a pandas data frame. If you'd like to visualize your pandas data, I recommend using matplotlib to prep the data into a figure. Code below showing how this would work; remember to import matplotlib using the 'New Library' functionality.

import numpy as np import pandas as pd

create dummy pandas data frame for visualization

y_data = np.array([[5, 1], [3, 3], [1, 2], [3, 1], [4, 2], [7, 1], [7, 1]])

import matplotlib.pyplot as plt

x = my_data[:,0] y = my_data[:,1]

extract subplots from the data points

ig, ax = plt.subplots() ax.plot(x, y)

Display the matplotlib Figure object to render our pandas data frame

isplay(fig)