Sorting Tkinter Treeview columns in ascending or descending order using Pandas DataFrame Part I

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ม.ค. 2025

ความคิดเห็น • 24

  • @miasevda4728
    @miasevda4728 ปีที่แล้ว

    Sir your videos are just amazing i can never thank you enough
    From Algeria.👏

    • @plus2net1
      @plus2net1  ปีที่แล้ว

      Glad to know that, thanks

  • @shajipalayoor1638
    @shajipalayoor1638 ปีที่แล้ว

    Sir please post one video generating report with columns bold heads, italic columns, I meant fully formatted text report in python

  • @aswathysivadasan8365
    @aswathysivadasan8365 ปีที่แล้ว

    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

    • @plus2net1
      @plus2net1  ปีที่แล้ว

      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.

  • @Damianoos1
    @Damianoos1 ปีที่แล้ว

    IT will be working with treeviw table connected with mysql database ?

    • @plus2net1
      @plus2net1  ปีที่แล้ว

      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.

  • @PANDURANG99
    @PANDURANG99 ปีที่แล้ว

    How to use it for database

    • @plus2net1
      @plus2net1  ปีที่แล้ว +1

      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

  • @prathmeshgulhane6351
    @prathmeshgulhane6351 ปีที่แล้ว

    Bro i have 1doubt

    • @plus2net1
      @plus2net1  ปีที่แล้ว

      Yes please

    • @prathmeshgulhane6351
      @prathmeshgulhane6351 ปีที่แล้ว

      @@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

    • @plus2net1
      @plus2net1  ปีที่แล้ว

      @@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))

    • @prathmeshgulhane6351
      @prathmeshgulhane6351 ปีที่แล้ว

      @@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()

    • @plus2net1
      @plus2net1  ปีที่แล้ว

      Ok, tomorrow