‘’‘不使用excel文件直接导出数据,正式迁移以此版本为准’’’
‘’‘20240408 timestamp字段带毫秒,迁移时to_date报错,将此类型字段转为日月年时分称标准格式后处理’’’
from cmath import nan
from datetime import datetime
import openpyxl
import decimal
import re
import pandas as pd
import numpy as np
import matplotlib.pyplot as pyplot
from sqlalchemy import true
import cx_Oracle
#将字符串按指定长度截取后返回list,最后不够位数的同样返回
def fixSplitStr(splitStr,fix_len):
ls_str=[]
if len(splitStr) > fix_len:
left = 0
for i in range(len(splitStr)):
if i % fix_len == 0:
ls_str.append(splitStr[left: i])
left = i
#对剩余的判断,有可能会出现刚好处于分割整数倍的情况,所以必须要用