Table Editor in Python with pandastable

NeuralNine · Beginner ·💻 AI-Assisted Coding ·2y ago

Key Takeaways

The video demonstrates how to build a simple table editor in Python using the pandastable package, which provides a graphical user interface for editing tables, similar to a minimalistic Excel clone. The package is used in conjunction with the Tkinter library for creating the GUI.

Full Transcript

what is going on guys welcome back in this video today we're going to learn how to easily build a simple table editor in Python with a graphical user interface almost like a minimalistic Excel clone using a package called Panda table so let us get right into [Music] it all right so this is really going to be a super simple tutorial in this video today we're going to work with an external python package called Panda tape and it's going to allow us to easily build a simple table editor with a graphical user interface in Python now the idea is we're going to build our graphical user interface with TK inter the core python package and then this pandas table package introduces a new component or a new widget you could say to the GUI called the table and it works basically like a very very minimalistic version of excel so we have the ability to add rows to change the content of files to Import and Export uh to filter to Aggregate and to sort and so on so it's a very minimalistic version of a uh sheet application you could say even though it doesn't have nearly as much functionality but it's a very easy way to do that and you don't really have to do much coding you just have to add the component to your application which is why I say it's going to be a very simple video so what we're going to do is we're going to open up our command line and we're going to install the packages that we need uh so we're going to use pip or pip 3 and install and then obviously pandas if you don't have it on your system yet and second pandas table the package that is going to give us this uh widget now what we're going to do in our code is we're going to say import TK inter s TK this is core python then import pandas aspd and from pandas table we want to import the table now we're going to model our application as a class I'm going to call this your table editor and we're going to provide a simple init method here we're going to define a root element so the root is going to be a TK instance we're going to set a title let's call this just table editor and now what we need to do is we need to add to this root window a frame and into this Frame we need to add the table we cannot add the table directly into the window we need to First create a frame so we're going to say self. frame is equal to TK frame part of self. root then self. frame is going to be packed and then we're going to say self. table is equal to table and here now we can provide a couple of things now first of all of course it's part of the frame but then we can also provide a default um a default data frame so we can say that the data frame is some data frame or we can just leave it as none so this is also possible we can just create the table I can say self table show and then self. root main Loop to run the application then I can go down here and say if uncore name uncore uncore equals then main if that's the case create an instance of table editor and this will already result in our application uh showing this table editor tool here however you can see we cannot really do a lot we don't have any data in here we don't have any buttons that we can work with so what we can do right away is we can go ahead and we can say that we want to enable two things we want to show the status bar so show status bar true and we want to show the toolbar which has all the functionality so I can run this and now you can see we don't have any data yet but we still have or we already have uh buttons here load a table we can save we can import CSV we can load an Excel file we can copy the table to clipboard we can paste the table we can do um operations like transposing aggregating and so on we can merge concatenate join we can filter we can do calculations we can fit models uh we can do a lot of things visually here just by adding the pandis table component now what we can do is we can define a sample data frame up here let's call this sample DF it's going to be a PD data frame uh let's just add some data here column one we'll have the values 1 2 3 then [Music] maybe column 2 column 3 let's use here A B C and then down here maybe something like four five six so now I can set this as the default data frame I can say data frame equals and then sample DF and then you can see we have the data here and now of course I can change it I can change this to six for example probably I have to press enter uh and then I can save this for example I can say save I can navigate to my documents directory where is it I have a lot of hidden directories here documents programming neural 9 python current and here of course I can save it as a pickle file but I can also go to all files and I can say data. CSV and this will automatically SA sa it as a CSV file as you can see here and um it will also save the six not the five so it saved the edited version and this is just a simple example right I can do a lot of more things I can add rows um I can I can change values I can uh transpose there you go I can transpose the whole uh data frame I can aggregate uh on different columns with different functions here uh I don't want to go through all the features but basically you you have this sort of minimalistic I don't like to call it actually Excel clone because you don't have these uh operations I think you cannot do stuff like equals and then some formula but you do have basic table editing and basic sheet manipulation functionality here uh let me see where where was the possibility to plot I can oh actually opened it on my second screen so I plotted 466 and you can see now here column 3 and then it plotted this um maybe I can also do it like this plot select it opens it up here again no actually now it doesn't show it on the x-axis uh but we have a bunch of different uh options here for styling and animation this is basically pandas in a graphical user interface and you can just add it to your application easily and build a simple table editor for yourself using this Panda table package so that's it for today's video I hope you enjoyed it and hope you learned something if so let me know by hitting a like button and leaving a comment in the comment section down below and of course don't forget subscribe to this Channel and hit the notification Bell to not miss a single future video for free other than that thank you much for watching see you in the next video and bye

Original Description

Today we learn how to easily build a simple table editor in Python using the pandastable package. ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾ 📚 Programming Books & Merch 📚 🐍 The Python Bible Book: https://www.neuralnine.com/books/ 💻 The Algorithm Bible Book: https://www.neuralnine.com/books/ 👕 Programming Merch: https://www.neuralnine.com/shop 💼 Services 💼 💻 Freelancing & Tutoring: https://www.neuralnine.com/services 🌐 Social Media & Contact 🌐 📱 Website: https://www.neuralnine.com/ 📷 Instagram: https://www.instagram.com/neuralnine 🐦 Twitter: https://twitter.com/neuralnine 🤵 LinkedIn: https://www.linkedin.com/company/neuralnine/ 📁 GitHub: https://github.com/NeuralNine 🎙 Discord: https://discord.gg/JU4xr8U3dm
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from NeuralNine · NeuralNine · 0 of 60

← Previous Next →
1 Visualizing Stock Data With Candlestick Charts in Python
Visualizing Stock Data With Candlestick Charts in Python
NeuralNine
2 Python Beginner Tutorial #1 - Installation and First Program
Python Beginner Tutorial #1 - Installation and First Program
NeuralNine
3 Python Beginner Tutorial #2 - Variables and Data Types
Python Beginner Tutorial #2 - Variables and Data Types
NeuralNine
4 Python Beginner Tutorial #3 - Operators and User Input
Python Beginner Tutorial #3 - Operators and User Input
NeuralNine
5 Python Beginner Tutorial #4 - If Statements and Conditions
Python Beginner Tutorial #4 - If Statements and Conditions
NeuralNine
6 Python Beginner Tutorial #5 - Loops
Python Beginner Tutorial #5 - Loops
NeuralNine
7 Python Beginner Tutorial #6 - Sequences and Collections
Python Beginner Tutorial #6 - Sequences and Collections
NeuralNine
8 Python Beginner Tutorial #7 - Functions
Python Beginner Tutorial #7 - Functions
NeuralNine
9 Python Beginner Tutorial #8 - Exception Handling
Python Beginner Tutorial #8 - Exception Handling
NeuralNine
10 Python Beginner Tutorial #9 - File Operations
Python Beginner Tutorial #9 - File Operations
NeuralNine
11 Python Beginner Tutorial #10 - String Functions
Python Beginner Tutorial #10 - String Functions
NeuralNine
12 Python Intermediate Tutorial #1 - Classes and Objects
Python Intermediate Tutorial #1 - Classes and Objects
NeuralNine
13 Python Intermediate Tutorial #2 - Inheritance
Python Intermediate Tutorial #2 - Inheritance
NeuralNine
14 Python Intermediate Tutorial #3 - Multithreading
Python Intermediate Tutorial #3 - Multithreading
NeuralNine
15 Python Intermediate Tutorial #4 - Synchronizing Threads
Python Intermediate Tutorial #4 - Synchronizing Threads
NeuralNine
16 Python Intermediate Tutorial #5 - Events and Daemon Threads
Python Intermediate Tutorial #5 - Events and Daemon Threads
NeuralNine
17 Python Intermediate Tutorial #6 - Queues
Python Intermediate Tutorial #6 - Queues
NeuralNine
18 Python Intermediate Tutorial #7 - Sockets and Network Programming
Python Intermediate Tutorial #7 - Sockets and Network Programming
NeuralNine
19 Python Intermediate Tutorial #8 - Database Programming
Python Intermediate Tutorial #8 - Database Programming
NeuralNine
20 Python Intermediate Tutorial #9 - Recursion
Python Intermediate Tutorial #9 - Recursion
NeuralNine
21 Python Intermediate Tutorial #10 - XML Processing
Python Intermediate Tutorial #10 - XML Processing
NeuralNine
22 Python Intermediate Tutorial #11 - Logging
Python Intermediate Tutorial #11 - Logging
NeuralNine
23 Python Data Science Tutorial #1 - Anaconda and PyCharm Setup
Python Data Science Tutorial #1 - Anaconda and PyCharm Setup
NeuralNine
24 Python Data Science Tutorial #2 - NumPy Arrays
Python Data Science Tutorial #2 - NumPy Arrays
NeuralNine
25 Python Data Science Tutorial #3 - Numpy Functions
Python Data Science Tutorial #3 - Numpy Functions
NeuralNine
26 Python Data Science Tutorial #4 - Plotting Functions With Matplotlib
Python Data Science Tutorial #4 - Plotting Functions With Matplotlib
NeuralNine
27 Python Data Science Tutorial #5 - Subplots and Multiple Windows
Python Data Science Tutorial #5 - Subplots and Multiple Windows
NeuralNine
28 Python Data Science Tutorial #6 - Matplotlib Styling
Python Data Science Tutorial #6 - Matplotlib Styling
NeuralNine
29 Python Data Science Tutorial #7 - Bar Charts with Matplotlib
Python Data Science Tutorial #7 - Bar Charts with Matplotlib
NeuralNine
30 Python Data Science Tutorial #8 - Pie Charts with Matplotlib
Python Data Science Tutorial #8 - Pie Charts with Matplotlib
NeuralNine
31 Python Data Science Tutorial #9 - Plotting Histograms with Matplotlib
Python Data Science Tutorial #9 - Plotting Histograms with Matplotlib
NeuralNine
32 Python Data Science Tutorial #10 - Scatter Plots with Matplotlib
Python Data Science Tutorial #10 - Scatter Plots with Matplotlib
NeuralNine
33 Python Data Science Tutorial #11 - 3D Plotting with Matplotlib
Python Data Science Tutorial #11 - 3D Plotting with Matplotlib
NeuralNine
34 Python Data Science Tutorial #12 - Pandas Series
Python Data Science Tutorial #12 - Pandas Series
NeuralNine
35 Python Data Science Tutorial #13 - Pandas Data Frames
Python Data Science Tutorial #13 - Pandas Data Frames
NeuralNine
36 Python Data Science Tutorial #14 - Pandas Statistics
Python Data Science Tutorial #14 - Pandas Statistics
NeuralNine
37 Python Data Science Tutorial #15 - Pandas Sorting and Functions
Python Data Science Tutorial #15 - Pandas Sorting and Functions
NeuralNine
38 Python Data Science Tutorial #16 - Pandas Merging Data Frames
Python Data Science Tutorial #16 - Pandas Merging Data Frames
NeuralNine
39 Python Data Science Tutorial #17 - Pandas Queries
Python Data Science Tutorial #17 - Pandas Queries
NeuralNine
40 Python Machine Learning Tutorial #1 - What is Machine Learning?
Python Machine Learning Tutorial #1 - What is Machine Learning?
NeuralNine
41 Python Machine Learning Tutorial #2 - Linear Regression
Python Machine Learning Tutorial #2 - Linear Regression
NeuralNine
42 Python Machine Learning Tutorial #3 - K-Nearest Neighbors Classification
Python Machine Learning Tutorial #3 - K-Nearest Neighbors Classification
NeuralNine
43 Python Machine Learning #4 - Support Vector Machines
Python Machine Learning #4 - Support Vector Machines
NeuralNine
44 Python Machine Learning Tutorial #5 - Decision Trees and Random Forest Classification
Python Machine Learning Tutorial #5 - Decision Trees and Random Forest Classification
NeuralNine
45 Python Machine Learning Tutorial #6 - K-Means Clustering
Python Machine Learning Tutorial #6 - K-Means Clustering
NeuralNine
46 Python Machine Learning Tutorial #7 - Neural Networks
Python Machine Learning Tutorial #7 - Neural Networks
NeuralNine
47 Python Machine Learning Tutorial #8 - Handwritten Digit Recognition with Tensorflow
Python Machine Learning Tutorial #8 - Handwritten Digit Recognition with Tensorflow
NeuralNine
48 Generating Poetic Texts with Recurrent Neural Networks in Python
Generating Poetic Texts with Recurrent Neural Networks in Python
NeuralNine
49 Stock Portfolio Visualization with Matplotlib in Python
Stock Portfolio Visualization with Matplotlib in Python
NeuralNine
50 Analyzing Coronavirus with Python (COVID-19)
Analyzing Coronavirus with Python (COVID-19)
NeuralNine
51 Making Text Images Readable Again with Python and OpenCV
Making Text Images Readable Again with Python and OpenCV
NeuralNine
52 Neural Networks Simply Explained (Theory)
Neural Networks Simply Explained (Theory)
NeuralNine
53 Motion Filtering with OpenCV in Python
Motion Filtering with OpenCV in Python
NeuralNine
54 Top 5 Programming Languages To Learn in 2020
Top 5 Programming Languages To Learn in 2020
NeuralNine
55 Simple TCP Chat Room in Python
Simple TCP Chat Room in Python
NeuralNine
56 Image Classification with Neural Networks in Python
Image Classification with Neural Networks in Python
NeuralNine
57 Edge Detection with OpenCV in Python
Edge Detection with OpenCV in Python
NeuralNine
58 S&P 500 Web Scraping with Python
S&P 500 Web Scraping with Python
NeuralNine
59 Simple Sentiment Text Analysis in Python
Simple Sentiment Text Analysis in Python
NeuralNine
60 Introduction - Algorithms & Data Structures #1
Introduction - Algorithms & Data Structures #1
NeuralNine

This video teaches how to build a simple table editor in Python using pandastable, covering installation, GUI creation, and data manipulation. The pandastable package provides a easy-to-use interface for editing tables, making it a great tool for beginners.

Key Takeaways
  1. Install pandastable using pip
  2. Import necessary libraries (Tkinter, pandas, pandastable)
  3. Create a GUI application using Tkinter
  4. Add a table to the GUI using pandastable
  5. Define a sample dataframe
  6. Enable status bar and toolbar
  7. Save and load data from CSV or pickle files
💡 The pandastable package provides a simple and easy-to-use interface for creating a table editor in Python, making it a great tool for beginners and those looking to quickly create a GUI application for data manipulation.

Related Reads

📰
Cursor Pricing 2026: Free vs Pro vs Ultra — Which Plan?
Learn how to choose the right Cursor plan for your coding needs and budget, and discover how this Agentic AI coding tool can boost your productivity
Dev.to AI
📰
enable Consistent AI Coding with Persistent Context Layers
Learn how persistent context layers can improve AI coding consistency and reliability
Dev.to AI
📰
LeetCode Isn’t Dead. Your Interview Prep Strategy Is.
Update your interview prep strategy to focus on practical skills and real-world problem-solving, as LeetCode-style interviews are evolving
Medium · Programming
📰
Build a UGC video moderation pipeline with FFmpeg + NudeNet
Learn to build a UGC video moderation pipeline using FFmpeg and NudeNet to ensure safe and respectful user-generated content
Dev.to · Mason K
Up next
Copilot Cowork: Setup, Skills, Plugins & Pricing
Matt Tutorials
Watch →