style: normalize code formatting across the codebase
- Standardize quote style (single to double quotes) - Improve code formatting consistency - Apply formatting to utilities, GUI components, and tools - Update imports and docstrings for consistency Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
"""
|
||||
分析 Excel 文件的数据结构
|
||||
"""
|
||||
|
||||
import pandas as pd
|
||||
import openpyxl
|
||||
import sys
|
||||
|
||||
# 设置输出编码
|
||||
if sys.platform == 'win32':
|
||||
if sys.platform == "win32":
|
||||
import io
|
||||
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
||||
|
||||
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
|
||||
|
||||
# 读取 Excel 文件
|
||||
file_path = "data/导出文件.xlsx"
|
||||
@@ -52,12 +54,12 @@ for sheet_name in sheet_names:
|
||||
for i, col in enumerate(df.columns):
|
||||
print(f" 列 {i}: {col}")
|
||||
print(f"\n数据预览:")
|
||||
pd.set_option('display.max_rows', 25)
|
||||
pd.set_option('display.max_columns', 20)
|
||||
pd.set_option('display.width', 200)
|
||||
pd.set_option('display.max_colwidth', 30)
|
||||
pd.set_option("display.max_rows", 25)
|
||||
pd.set_option("display.max_columns", 20)
|
||||
pd.set_option("display.width", 200)
|
||||
pd.set_option("display.max_colwidth", 30)
|
||||
print(df)
|
||||
pd.reset_option('display.max_rows')
|
||||
pd.reset_option('display.max_columns')
|
||||
pd.reset_option('display.width')
|
||||
pd.reset_option('display.max_colwidth')
|
||||
pd.reset_option("display.max_rows")
|
||||
pd.reset_option("display.max_columns")
|
||||
pd.reset_option("display.width")
|
||||
pd.reset_option("display.max_colwidth")
|
||||
|
||||
Reference in New Issue
Block a user