01 2023 档案
摘要:traceback使用 import traceback import os from pathlib import Path from io import StringIO fp = StringIO() # 使用内存 try: print(' ') int('abc') except: # tr
阅读全文
摘要:pandas 读取/保存数据 import pandas as pd file = r'' df = pd.read_excel(file) df_columns = df.columns.to_list() # 字段名list redundant_column = ['name', 'age']
阅读全文
摘要:1. random随机生成多位数字 import random str1 = ''.join([str(i) for i in random.sample(range(0,9), 6)]) # 随机生成六位
阅读全文