Skip to content
Advertisement

How to get a user input for a column in pandas by creating a GUI using tkinter?

I have a dataframe with 3 columns: Date, attribute_one, attribute_two. The date column is blank but the other two columns are filled with some data. how can I use tkinter package to build a GUI which would prompt the user to enter date which will then be eventually stored in the dataframe.

Advertisement

Answer

Using the tkinter Entry class, and using a list, you can easily accomplish so.

JavaScript

You can then add it to the column. If you want to ask them in the console, use this instead:

JavaScript

Then just add the variable i to your dataframe.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement