Skip to content

Instantly share code, notes, and snippets.

@isc-rsingh
Created January 4, 2017 16:10
Show Gist options
  • Save isc-rsingh/67e45a1c0ecc64207a189501d9559ea5 to your computer and use it in GitHub Desktop.
Save isc-rsingh/67e45a1c0ecc64207a189501d9559ea5 to your computer and use it in GitHub Desktop.
pixiedust display.py in dir display/table
class TableDisplay(Display):
def doRender(self, handlerId):
entity=self.entity
if dataFrameMisc.fqName(entity) == "graphframes.graphframe.GraphFrame":
if handlerId == "edges":
entity=entity.edges
else:
entity=entity.vertices
if dataFrameMisc.isPySparkDataFrame(entity) or dataFrameMisc.isPandasDataFrame(entity):
self._addHTMLTemplate('dataframeTable.html', entity=PandasDataFrameAdapter(entity))
return
self._addHTML("""
<b>Unable to display object</b>
"""
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment