Stacked bar issue

data = event.source.selectedData
print data

i am printing the Stacked bar - slectedData property. when i click the stacked bar different colors i am getting the output of dataset of each color which i have method in image.
my issue is i just want to get “SPA,Service,Line,Compressor” these keywords from the output when i print. what i need to do to get the output? please let me know i am on it for a project.