- 博客(12)
- 收藏
- 关注
原创 python链接excel
import xlrdprint(type(xlrd))file = 'D:\\test.xlsx'wb = xlrd.open_workbook(filename=file)ws = wb.sheet_by_name('Sheet2')dateset=[]for r in range(ws.nrows): col=[] for c in range(ws.ncols): col.append(ws.cell(r,c).value) dateset.ap
2021-09-02 16:22:02
252
3
原创 pycharm 链接oracle
1、建立游标运行代码显示代码import cx_Oraclecon1 = cx_Oracle.connect('账号', '密码', 'IP:1521/服务名')cursor = con1.cursor()sql = "SELECT * FROM ……"cursor.execute(sql)print(cursor.fetchall())
2021-08-02 17:16:31
415
原创 python连oracle的问题们
运行import成功问题一:import cx_Oracledb = cx_Oracle.connect('zfwjj', 'zfwjj1119', '2.20.101.16:1521/rac1db')报错:Traceback (most recent call last):File “D:/untitled2/hello.py”, line 2, in cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Clie
2021-07-30 17:58:36
115
转载 pycharm中cx_oracle 的安装
我的环境如下:windows7,python 3.7,flask ,oracle client 11.2 ,现在想要安装cx_oracle去连接oracle,折腾了好几个小时,凸(艹皿艹 )先说关键点:1.不要使用pip install cx_oracle的方式安装!!!!正确的做法是:1.设置ORACLE_HOME和TNS_ADMIN两个环境变量,以下是我的设置值显示结果这两个参数设置完了以后,你可以用你本机安装的toad啊,plsql/developer之类的试试能不能正常的连上oracle数
2021-07-30 15:09:45
2500
原创 数据分析处理
1、打开文档2、散点图import matplotlib.pyplot as pltx = [5,7,8,7,2,17,2,9,4,11,12,9,6]y = [99,86,87,88,111,86,103,87,94,78,77,85,86]plt.scatter(x, y)plt.show()
2021-07-26 11:12:32
111
转载 oracle function 中文转拼音
CREATE OR REPLACE FUNCTION fn_getpy (p_str IN VARCHAR2,p_flag NUMBER DEFAULT NULL)RETURN VARCHAR2ASv_compare VARCHAR2 (4);v_return VARCHAR2 (4000);v_length INT := 0;v_substr VARCHAR2 (4);FUNCTION fn_nlssort (p_word IN VARCHAR2)R
2021-03-10 14:55:00
928
原创 11-15 input
11、定义变量我们在每一个打印行末尾放一个 end=’ ’ ,是为了告诉 print 不要另起一行。print ("How old are you?", end=' ')age = input()print ("How tall are you?", end=' ')height = input()print ("How much do you weigh?", end=' ')weight = input()print (f"So, you're {age} old, {height
2020-11-27 17:10:54
122
原创 07-10,打印,转义字符
习题7print中,“,”类似空格print ('Marry had a little lamb.')print ('Its fleece was white as %s.' %'snow')print ('And everywhere that Mary went.')print ("."*10)end1 = "c"end2 = "h"end3 = "e"end4 = "e"end5 = "s"end6 = "e"end7 = "B"end8 = "u"end9 = "
2020-10-13 20:34:58
209
3
原创 5 更多的变量和打印格式化字符
直接打印变量,和取值打印变量print(my_hair)print (‘my hair %s’ % my_hair)my_name = 'Zed A. Shaw'my_age = 35 # not a liemy_height = 74 # inchesmy_weight = 180 # lbsmy_eyes = 'Blue'my_teeth = 'White'my_hair = 'Brown'print(my_hair)print ('my hair %s' % my_hair)
2020-09-28 18:34:55
152
3
原创 03、list列表,可变序列
列表可用索引、分片、连接和乘法。列表可修改,赋值、删除。1、输出print(list('hello'))2、元素赋值
2020-09-28 17:25:19
322
7
原创 02、通用序列操作
数据结构:通过某种方式组织在一起的数据元素的集合。最基本的数据结构是序列,python有6种内建序列,列表、元组、字符串、unicode字符串、buffer对象、xrange对象。通用序列操作:索引、分片、加、乘、成员资格、迭代,及内置函数。列表可修改,元组不可修改。1、索引#list列表classmates = ['Michael', 'Bob', 'Tracy']print (classmates)print (classmates[0])print (classmates[-2])
2020-08-31 17:14:53
383
6
原创 01、python的输入、输出们
1、输出print ("hello, world")#逗号隔开print('The quick brown fox', 'jumps over', 'the lazy dog')#计算print('1+2=',1+2)2、输入#反斜杠 name = input('what\'s your name ?')print ('hi,',name)3、python:缩进方式,大小写敏感#a = int(input("input a number"))if a >= 0:
2020-08-26 22:32:14
279
3
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅