Flow variables created in python- Converting from Unicode to ASCII

I am creating flow variables in python nodes that contain metadata information associated with a microarray. I am trying to pull this information from a database, convert it to a flow variable, and then pass the flow variables in functions that are used later on in the workflow. However, when I create the flow variables from the dataframes it is converting the numbers to unicode format, which cannot be passed in the functions in python I created. 

Is there any easy way to convert unicode back to ascii? Or is there a way to prevent KNIME from converting things to unicode?

Okay I found a work around that solved my problem.

Assigned the flow variable to a variable and then used the .encode function and the replace function. I then subset the result to get the characters that I wanted and joined and split the result until I got the appropriate text. Not the most elegant way of doing things, but ulimately it worked!

doses = flow_variables['Doses']
doses2 = doses.encode('ascii','ignore').replace("'","")
doses3 = doses2[1:-1]
doses4 = "".join(doses3.split())
sdoses = doses4.strip().split(",")