I attempting to parse an arrow into the header of a power table. The console output shows the correct symbol but I get accented characters instead.
Here is a custom function that returns a symbol to be append to the custom header.
def goalSymbol(self, goal):
"""
Arguments:
self: A reference to the component instance this method is invoked on. This argument
is automatic and should not be specified when invoking this method.
"""
up = u'\u2191' # up arrow
down = u'\u2193' # down arrow
print up
print down
if goal == "eq":
return "="
elif goal == "gt":
return "{}".format(up)
elif goal == "gte":
return "{}=".format(up)
elif goal == "lt":
return "{}".format(down)
elif goal == "lte":
return "{}=".format(down)
else:
return "RA"
And here is some brief context of how that function is invoked, not shown is the append dataset functionality which does work. can show the entirety of the codeblock as well (part of the Initialize extension method) upon request.
goal = kpi_collection['goal']
target = "Target{}".format(self.goalSymbol(goal))
headers = ["Unit",target,"Actual"]