能不能选多选列 操作哇 比如 两… →点击查看智谱清言的回答https://chatglm.cn/share/Fopuk
单选版:
import sys
import pandas as pd
from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog, QTableWidget, QTableWidgetItem, QVBoxLayout, QPushButton, QWidget
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
# 设置窗口标题
self.setWindowTitle('Excel Column Analyzer')
# 创建表格控件
self.table = QTableWidget()
self.table.setColumnCount(5) # 假设表格有5列
self.table.setHorizontalHeaderLabels(['Column 1', 'Column 2', 'Column 3', 'Column 4', 'Column 5'])
# 创建按钮
self.load_button = QPushButton('Load Excel')
self.load_button.clicked.connect(self.load_excel)
self.analyze_button = QPushButton('Analyze Column')
self.analyze_button.clicked.connect(self.analyze_column)
# 布局
layo