Last active
January 4, 2017 16:09
-
-
Save isc-rsingh/efcb98adf60e936c032a427884b332ce to your computer and use it in GitHub Desktop.
pixiedust __init__.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
@PixiedustDisplay(isDefault=True) | |
class TableDisplayMeta(DisplayHandlerMeta): | |
@addId | |
def getMenuInfo(self,entity, dataHandler): | |
if dataFrameMisc.isPySparkDataFrame(entity) or dataFrameMisc.isPandasDataFrame(entity): | |
return [ | |
{"categoryId": "Table", "title": "DataFrame Table", "icon": "fa-table", "id": "dataframe"} | |
] | |
elif dataFrameMisc.fqName(entity) == "graphframes.graphframe.GraphFrame": | |
return [ | |
{"categoryId": "Table", "title": "Graph Vertices", "icon": "fa-location-arrow", "id":"vertices"}, | |
{"categoryId": "Table", "title": "Graph Edges", "icon": "fa-link", "id":"edges"} | |
] | |
else: | |
return [] | |
def newDisplayHandler(self,options,entity): | |
return TableDisplay(options,entity) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment