Open Excel Spreadsheet In Treeview With Pandas and Numpy - Python Tkinter GUI Tutorial #125

Open Excel Spreadsheet In Treeview With Pandas and Numpy - Python Tkinter GUI Tutorial #125

Codemy.com

3 года назад

40,270 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Maryjoy Freires
Maryjoy Freires - 23.08.2023 16:01

Hi sir, how about open a specific sheet for example is I only want to show to my treeview the sheet 2 in excel?

Ответить
Fernando Martino
Fernando Martino - 01.07.2023 06:07

is there a way to automatically adjust the column width depending on the width of the text in the columns? How could be done this?

Ответить
Chinmay Boddawar
Chinmay Boddawar - 08.05.2023 10:39

how to Open Exel Spreadsheet in Grid ?

Ответить
Sathya Bhat
Sathya Bhat - 24.04.2023 17:59

Can anyone tell me how to keep this treeview window dynamic!!

For Ex : If the content changes in .CSV file, it should automatically update in treeview window..

Please guide

Ответить
Patrik Granstrom
Patrik Granstrom - 10.04.2023 15:12

I get " NameError: name ´df´ is not defined" in:
my_tree["column"] = list(df.columns)

what could be the reason?

Ответить
Amanda Salisbury
Amanda Salisbury - 20.02.2023 22:44

My except error code is not being run after an exception. If I run file_open(): I get the open file window, but if I close it without choosing a file I get the FileNotFoundError. Then my program freezes up and I can no longer open a file due to locked database. It never executes what is inside the except error code. Added the print to see if there was something wrong with my label, and it never showed up. I also added text to the label where it was created and it did show up.

if filename:
try:
filename = r"{}".format(filename)
df = pd.read_excel(filename, header= None)

except FileNotFoundError:
print('Did This Work?')
my_label.config(text="File could not be Opened")

except ValueError:
my_label.config(text="File could not be Opened")

Ответить
AJs Unofficial
AJs Unofficial - 03.02.2023 04:44

John how about not opening the file..but we have a dialogue box and we give them a word or code and it reads thru a folder with multiple pdfs and brings it back in on the screen relevant information say a line or two of the word or the code

Ответить
john marigu
john marigu - 23.10.2022 15:03

Hi Teacher, Am John from Kenya. Kindly create a video on how to print tkinter treeview data. Am trying it but it's printing blank page. Thanks.

Ответить
Henrique Tavares
Henrique Tavares - 14.07.2022 02:30

John, is it possible to do a delete columns function that works with the spreadsheet we see in the Treeview ?

Ответить
Dianjin Xu
Dianjin Xu - 02.05.2022 02:40

Thank you for the tutorial. One thing that bothered me was the .filetype command. I tkinter is using .filetypes in the current version instead.

Ответить
Bruno Barros
Bruno Barros - 16.04.2022 13:22

Sir, how can I align the values ​​in the center of the column?

Ответить
Christos Karliampas
Christos Karliampas - 31.03.2022 11:11

It is in fact a series everyone interested in Python and Tkinter should follow, I found it very informative! Thank you so much, you helped me a lot to start programming my first GUI!

Ответить
Tazul Islam
Tazul Islam - 21.01.2022 02:01

There are not shown more than 1600 rows in treeview table. Need to show more than 5000 rows. pls make a tutorial in this regard.

Ответить
Shubham Mali
Shubham Mali - 06.01.2022 01:32

It is possible with csv file ?

Ответить
Andre Boss
Andre Boss - 15.12.2021 23:15

Great video. Very informative and well explained

Ответить
Abel Avalos
Abel Avalos - 25.10.2021 08:23

Great tutorial. I actually applied this to my vehicle inventory query app and added vertical and horizontal scrollbars. Thank you.

Ответить
Ikrame Ounadi
Ikrame Ounadi - 14.10.2021 15:59

HELPP PLEASE !!!! i'm working on a project , the main page has upload button and search button , i uploaded the file like you did in the command of the upload button so when i press the button i get a new window with this video content , but when i close it the data is not saved , i want to use the search button to get information from the excel file uploaded in the content of the upload button . MY problem is i don't know how to save the data when i close the window , and how to make the search .

Ответить
ajinkya dalvi
ajinkya dalvi - 06.10.2021 20:21

Sir can you please make a video to add scrollbars to browse excel file in tree view.

Ответить
Aljoe Anthony Berdin
Aljoe Anthony Berdin - 06.10.2021 04:25

how should fix this error >>>> ModuleNotFoundError: No module named '_typeshed'

Ответить
Ryan Gaspard
Ryan Gaspard - 17.09.2021 21:37

Smash that like button guys n gals! its free! great python tkinter tutorial, Codemy. Thanks

Ответить
vedavyas kota
vedavyas kota - 09.09.2021 16:21

sir CSV file is not opening with it

Ответить
Gopinath S
Gopinath S - 19.07.2021 17:20

How to add search field in this, which works dynamically filtered with data ? Thanks in advance

Ответить
Muneeb Khan
Muneeb Khan - 18.06.2021 14:29

I'm making a POS software and your videos are helping me a lot.

Ответить
Muneeb Khan
Muneeb Khan - 18.06.2021 14:28

Thanks a lot man

Ответить
Alwyn Joby
Alwyn Joby - 03.06.2021 09:15

Sir how do we fix the width in the case of importing excel file?

Ответить
Deven Jain
Deven Jain - 23.05.2021 08:08

Is it possible to open only selected columns from a spreadsheet instead of the entire sheet?

Ответить
Deven Jain
Deven Jain - 23.05.2021 08:05

Is it possible to click on a record in Tree-View and clicking on it automatically fills in all the data from that record in the corresponding entry boxes available on the screen?

Ответить
Deven Jain
Deven Jain - 23.05.2021 07:59

Hey, is it possible to group data be a particular column and then display it?
Fir example if multiple records have the the same value of one column, say the "Name" column, is it possible to add the first one to a parent and create a child which contains the rest of the data?

Ответить
Sreeram Pillai
Sreeram Pillai - 10.04.2021 21:51

Hi
I am getting this error ...can make any sense of it

Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\sp48257\Anaconda3_2\lib\tkinter\_init__.py", line 1883, in __call_
return self.func(*args)
File "<ipython-input-8-6d3db6599392>", line 52, in file_open
my_tree["Show"]= "headings"
File "C:\Users\sp48257\Anaconda3_2\lib\tkinter\_init__.py", line 1648, in __setitem_
self.configure({key: value})
File "C:\Users\sp\Anaconda3_2\lib\tkinter\__init__.py", line 1637, in configure
return self._configure('configure', cnf, kw)
File "C:\Users\sp\Anaconda3_2\lib\tkinter\__init__.py", line 1627, in _configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: unknown option "-Show"

Ответить
Angelus
Angelus - 09.04.2021 03:40

thanks... however, pyinstaller is having issues with pandas.

Ответить
Grey Wolf
Grey Wolf - 23.03.2021 06:36

No big boooom today😔

Ответить
Neil Thomas
Neil Thomas - 07.03.2021 13:52

Way to open a file? I just use the string returned from filedialog, rather than converting it to a string.

Ответить
Ali Alavizadeh
Ali Alavizadeh - 17.02.2021 10:34

thank you Mr Elder for this cool contents 👍

Ответить
Bá Thuận Đỗ
Bá Thuận Đỗ - 04.02.2021 11:06

sorry sir, i can't know it

my_tree["column"] = list(df.columns)
Unbound Local Error: local variable 'df' referenced before assignment

Ответить
Aruvi Tech News
Aruvi Tech News - 19.01.2021 09:24

Explaining the each and every line of program clearly..Thank you so much Sir...

Ответить
SHRUTI MISHRA
SHRUTI MISHRA - 29.10.2020 17:36

Hello Sir, I tried this code but the filemenu was not added somehow so i cannot see the menu to open the file also there is no error i cannot understand what should i do

Ответить
Oscar Roman
Oscar Roman - 15.10.2020 00:50

Is it possible to show up specific rows and columns from a DataFrame on the Treeview?
Hoping you can give me a hand?

Ответить
netanel levi
netanel levi - 25.09.2020 13:07

Thanks !! the video is perfect !

Ответить
Abiola Olaleye
Abiola Olaleye - 25.09.2020 09:48

Gracias señor

Ответить
Aviral Kaushik
Aviral Kaushik - 25.09.2020 07:33

Sir,
I want to ask that can we convert .py file to .apk file or not?

Ответить
Adistar-964
Adistar-964 - 24.09.2020 18:04

awesome!!!

Ответить
Vibhu Khullar
Vibhu Khullar - 24.09.2020 13:17

The Tkinter textbox i doing some weird stuff, whenever I m working with the text widget and press (Control+i, Control+h, Control+k), it start doing weird stuff like:-
Control+i - is deleting all the selected text (the text under selection tag).
Control+h - is working somewhat like a Backspace key.
Control-k - removes all the text at the right side to the position of cursor.

Do you know some trick to fix that? Like it's messing up the things if i wanna bind some event or function with these key combinations, like I wanna use Control-Key-I for Italics function

Ответить
John Minton
John Minton - 24.09.2020 13:03

Great video John. Could you possibly do a video regarding taking an sql database and slapping it onto a treeview?

Ответить
Programming Tech
Programming Tech - 24.09.2020 08:54

Your Python Tkinter Playlist is really helping the students and I'm one of them 😅😅😅
Thanks a lot Sir !

Ответить
Shreyash Prakash
Shreyash Prakash - 23.09.2020 22:57

NIce i have been watchin all ur vids recently

Ответить
Rogério Vaz
Rogério Vaz - 23.09.2020 22:13

Great.

Ответить