Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2018 09:53 PM
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 visualizationy_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 pointsig, ax = plt.subplots() ax.plot(x, y)
Display the matplotlib Figure object to render our pandas data frameisplay(fig)