How to view Excel File or Pandas DataFrame in Tkinter (Python GUI)

preview_player
Показать описание
#Tkinter #PythonExcel #PythonTutorial #Pandas #DataScience

This video will show you step by step on how to place a Pandas DataFrame or Excel File into a Tkinter GUI.

Programming Language: Python 3.7
Text Editor: Atom (The linter used is Flake8)
Libraries: Pandas, TKinter

The code can be found in the github gist below:
Рекомендации по теме
Комментарии
Автор

Timestamps
0:00 Intro
1:00 Creating the Root, Frames, Label and Buttons
10:00 Creating the Treeview Widget and scrollbars
14:44 Creating the button commands
16:53 Creating the File Dialog Function (opens file explorer)
19:40 Load Excel File into Treeview (what you most likely came for)
25:54 Testing the code


It's probably evident but i didn't check beforehand if it works for csv files. Nevertheless for the code please see the description, the code in the description also works for csv files!

RamonWilliams
Автор

A great video illustrating a practical implementation around a Treeview. 👍

jgp
Автор

This was extremely helpful. Thanks for this video.

dipitjaywant
Автор

Don't leave comments very often but just saying nice one bro, exactly what I was looking for anyway! Nice to have actual explanations behind some of the functionality and parameter sets for a change.

logicalprogression
Автор

Very educational. I modified it for accepting csv and txt files as well.

slickwillie
Автор

Excellent tutorial, thanks much. Still trying to figure out how to control the column widths otherwise it is all working great.
Got it, in the column loop add tv1.column(column, width= 350)

tedtoad
Автор

'You're waking up in 7 hours' lmaooo that hit different 😂😂

johndavies
Автор

Great tutorial. Thank you for keeping it simple. How about showing how to alter the df frame and return as excel file

martin-xqte
Автор

I want to thanks for this clean explanation ... 🇩🇿👍

ghaliahmed
Автор

and now do a video about how to edit those values or add new values or delete values and automatically save it. It will help a lot

aminegatou
Автор

you saved my life. thank you very much !

canerucal
Автор

This was great, thank you. I was actually looking for a video that would show me how to allow a user to select an excel file and then have my program run pandas stuff on it and then return a new dataframe (that was modified as per the pandas stuff) and then save it wherever the user wanted to save it as an excel file. Do you have any content like that?

Thank you.

TheSenseii
Автор

Thanks a lot for this! Very helpful.
I have one question, how can I work with loaded excel/csv file, for example if I want to get the values from it and use them for any calculations? Even a little hint will help, thank you!

alan
Автор

Thank you for the tutorials. Please how do i create a filter dataframe from the load excel data and have it displayed on another window

temitopecomfort
Автор

Hi Ramon Williams, Thanks a lot for this! Very helpful. I want to open multiple excel files and plot them. Tried to add some code but it didn't work. Can you help me please ?

majidzinkoohi
Автор

Hi.
Thanks for the tutorial.
I got a problem with the attribute yview and xview for treescrolly and treescrollx.

carlosngaba
Автор

This code helped me a lot. I just wanted to ask, how do I get rid of an additional "unnamed" column without hard coding it?

kiefah
Автор

hi Ramon, im using gspread/pandas/numpy module and want to load a specific google sheet into a tkinter window, ive got it all working fine without tkinter/gui, any help would be dearly appreciated as ive been struggling on this for some weeks now as im a newbie python coder. best regards simon. also really enjoyed your tut and subbed.

idonotcomplyrevolution
Автор

I am getting some errors. No such file as (file_path) when i click load, so the try/except isnt working and the browse does not work probablt because of the initialdir. i didnt see this on yout github but ill look again

charlesdixon
Автор

Great Explanation. But, when i try the treeview widget i receive an error stating "NULL main window". Copied your code from "Github". Can you help on this. TIA

Braha_