Multiple Dynamic OptionMenu using DataFrame in Python Tkinter GUI-PY_VAR21 Error
<p>I have been working on filtering the DataFrame rows so that I could arrive at a Single row with respect to different options chosen in OptionMenus in sequence.
I did try to store the selected variable from OptionMenu and when I printed it, I get </p>

<p>'PY_VAR21' </p>

<p>as output. </p>

<p>Can you kindly clarify me. I enclose my datafile where I am willing to have Multiple dynamic OptionMenus where selected value goes further to another class.</p>

<pre><code>from Tkinter import *
master = Tk()
class MyClass():

    def __init__(self):

        self.zero=data.Category.unique()     
        self.variable0=StringVar()        
        option_menu=OptionMenu(master,self.variable0,*self.zero)        
        option_menu.pack()        

x=MyClass()
aa=x.variable0
print aa
mainloop()
</code></pre>

<p>I have got thousands of values and categories in each column and thus I want to automate the Dynamic OptionMenu using the available DataFrame.</p>

<p>I have been trying with different approaches and am failing for many number of days.Thank you.<a href="http://i.stack.imgur.com/re2Ff.png" rel="nofollow">Datafile</a></p>

<p>When you see the <code>PY_VAR21</code> that is the instance of the variable. However if you say:</p>

<pre><code>print self.variable0.get()
</code></pre>

<p>you should see the actual value of the variable.</p>

python python-2.7 tkinter