- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
check missing values | Data Analysis using Python Tkinter | Part 2
Code : - ## Data Analysis using Python Tkinterimport tkinter as tk
from tkinter import filedialog, messagebox , scrolledtext
import pandas as pd
df = None # Global
root = tk.Tk()
root.title("Data Analysis using Python Tkinter")
root.geometry("500x500")
# file upload dialog and button
def upload_file():
global df
filepath = filedialog.askopenfilename(
title="Select a file",
filetypes = (
("Excel files " , "*.xlsx; *.xls"),
("CSV Files", "*.csv") ## to accept only excel and csv files
,)
)
if filepath:
try:
if filepath.endswith(".csv"):
df=pd.read_csv(filepath)
else:
df=pd.read_excel(filepath)
label.configure(text=f"Selected file successfully : \n{filepath}\n Rows: {df.shape[0]}|Columns: {df.shape[1]}")
btn_check_missing.configure(state="normal")
except Exception as e:
messagebox.showerror("Error",f"Could not Load file: \n{e}")
else:
label.configure(text="No file selected")
def check_missing():
if df is not None:
result = df.isnull().sum().to_string()
text_box.delete(1.0, tk.END)
text_box.insert(tk.END , "Missing Values \n")
text_box.insert(tk.END,result)
else:
messagebox.showwarning("warning","Please Upload a file first")
btn = tk.Button(root, text = "Upload file" , command=upload_file,padx=10,pady=10)
btn.pack(pady=20)
label = tk.Label(root,text="No file selected", wraplength=350,justify="center")
label.pack(pady =10)
btn_check_missing = tk.Button(root , text = "Check Missing Values" , command=check_missing , state="disabled")
btn_check_missing.pack(pady=10)
text_box = scrolledtext.ScrolledText(root, width=70 , height=15, wrap=tk.WORD)
text_box.pack(pady=10)
root.mainloop()
Видео check missing values | Data Analysis using Python Tkinter | Part 2 канала SE CS Academy
from tkinter import filedialog, messagebox , scrolledtext
import pandas as pd
df = None # Global
root = tk.Tk()
root.title("Data Analysis using Python Tkinter")
root.geometry("500x500")
# file upload dialog and button
def upload_file():
global df
filepath = filedialog.askopenfilename(
title="Select a file",
filetypes = (
("Excel files " , "*.xlsx; *.xls"),
("CSV Files", "*.csv") ## to accept only excel and csv files
,)
)
if filepath:
try:
if filepath.endswith(".csv"):
df=pd.read_csv(filepath)
else:
df=pd.read_excel(filepath)
label.configure(text=f"Selected file successfully : \n{filepath}\n Rows: {df.shape[0]}|Columns: {df.shape[1]}")
btn_check_missing.configure(state="normal")
except Exception as e:
messagebox.showerror("Error",f"Could not Load file: \n{e}")
else:
label.configure(text="No file selected")
def check_missing():
if df is not None:
result = df.isnull().sum().to_string()
text_box.delete(1.0, tk.END)
text_box.insert(tk.END , "Missing Values \n")
text_box.insert(tk.END,result)
else:
messagebox.showwarning("warning","Please Upload a file first")
btn = tk.Button(root, text = "Upload file" , command=upload_file,padx=10,pady=10)
btn.pack(pady=20)
label = tk.Label(root,text="No file selected", wraplength=350,justify="center")
label.pack(pady =10)
btn_check_missing = tk.Button(root , text = "Check Missing Values" , command=check_missing , state="disabled")
btn_check_missing.pack(pady=10)
text_box = scrolledtext.ScrolledText(root, width=70 , height=15, wrap=tk.WORD)
text_box.pack(pady=10)
root.mainloop()
Видео check missing values | Data Analysis using Python Tkinter | Part 2 канала SE CS Academy
Комментарии отсутствуют
Информация о видео
29 августа 2025 г. 21:12:20
00:24:31
Другие видео канала













![Boolean program using command arguments #cmd in java \/|/\ changes:-op=Boolean.parseBoolean(as[0])](https://i.ytimg.com/vi/WHnYVPdAr-s/default.jpg)







