Created
January 4, 2017 16:10
-
-
Save isc-rsingh/67e45a1c0ecc64207a189501d9559ea5 to your computer and use it in GitHub Desktop.
pixiedust display.py in dir display/table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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