Sir how we can add the data from one treeview table to the other treeview table suppose we select a row from the 2nd table and how we can add it to the 1st table in a particular row
On selection of row you can read the data like this p_id = trv.selection()[0] # collect selected row id print(trv.item(p_id)) # Dictionary of all options print(trv.item(p_id)['values']) # List of values. These values you can then insert to 1st Treeview by using insert(), further featurs like not allow insert if already exist etc can be added.
Yes, sorce can be from MySQL, SQLite , CSV , Excel or from any other formats. The Here the DataFrame is creatd by reading excel file, the same dataframe can be created by using any other source.
Source can be anything, once a dataframe is created from Excel or CSV or from MySQL database , that can be used. Here different sources are used . www.plus2net.com/python/tkinter-treeview-dynamic.php
@@plus2net1 I am creating the tkinter gui To calculate mean In which I want to take input from the user like the array type this 10,20,30 in the one entry widget and but i am not getting how do i take such input like the ☝ I will be grateful for your help sir
@@prathmeshgulhane6351 Take the inputs like 10,23,30 and crate a list by using split(), here my_list is the input string my_list=my_list.split(',') Once you have to list you can convert each element to integer by using map() my_list=map(int,my_list) Then get the mean like this print("Mean value : ", sum(my_list)/len(my_list))
@@plus2net1 sir i tried and messed up All and not getting it Can u please 🙏 fix my code: from tkinter import * root = Tk() root.geometry("500x500") def Calcu(): a =(map(int,input().split())) a.StringVar() ent = Entry(root) ent.pack() btn = Button(root,text = "Calculate",command = Calcu ) btn.pack() root.mainloop()
Sir your videos are just amazing i can never thank you enough
From Algeria.👏
Glad to know that, thanks
Sir please post one video generating report with columns bold heads, italic columns, I meant fully formatted text report in python
Sir how we can add the data from one treeview table to the other treeview table suppose we select a row from the 2nd table and how we can add it to the 1st table in a particular row
On selection of row you can read the data like this
p_id = trv.selection()[0] # collect selected row id
print(trv.item(p_id)) # Dictionary of all options
print(trv.item(p_id)['values']) # List of values.
These values you can then insert to 1st Treeview by using insert(), further featurs like not allow insert if already exist etc can be added.
IT will be working with treeviw table connected with mysql database ?
Yes, sorce can be from MySQL, SQLite , CSV , Excel or from any other formats. The Here the DataFrame is creatd by reading excel file, the same dataframe can be created by using any other source.
How to use it for database
Source can be anything, once a dataframe is created from Excel or CSV or from MySQL database , that can be used. Here different sources are used .
www.plus2net.com/python/tkinter-treeview-dynamic.php
Bro i have 1doubt
Yes please
@@plus2net1
I am creating the tkinter gui
To calculate mean
In which I want to take input from the user like the array type this 10,20,30 in the one entry widget and but i am not getting how do i take such input like the ☝
I will be grateful for your help sir
@@prathmeshgulhane6351 Take the inputs like 10,23,30 and crate a list by using split(), here my_list is the input string
my_list=my_list.split(',')
Once you have to list you can convert each element to integer by using map()
my_list=map(int,my_list)
Then get the mean like this
print("Mean value : ", sum(my_list)/len(my_list))
@@plus2net1 sir i tried and messed up
All and not getting it
Can u please 🙏 fix my code:
from tkinter import *
root = Tk()
root.geometry("500x500")
def Calcu():
a =(map(int,input().split()))
a.StringVar()
ent = Entry(root)
ent.pack()
btn = Button(root,text = "Calculate",command = Calcu )
btn.pack()
root.mainloop()
Ok, tomorrow