# 1 删除重复元素 2 映射 replace 代替 s = Series(data=[3,4,5,6,7,8]) s.replace(3,'s') #新数据 原数据不变 s.replace([4,5],['sx','zc']) #多值替换 replace参数说明: method:对指定的值使用相邻 ...
分类:
其他好文 时间:
2019-07-03 00:29:39
阅读次数:
112
一 整形 int python中整形用int表示 python2中 在32位机器上,整数的位数为32位,取值范围为-231~231-1,即-2147483648~2147483647 在64位系统上,整数的位数为64位,取值范围为-263~263-1,即-9223372036854775808~92 ...
分类:
其他好文 时间:
2019-07-02 21:16:38
阅读次数:
164
简单写就String.format("%04d", 3)不过令我意外的是 StringBuilder +replace 效率居然更高 public class Test { public static String format2(int shortval) { String formatted =... ...
分类:
其他好文 时间:
2019-07-02 19:17:54
阅读次数:
99
1、首先需要安装第三方库 pip install pycryptodome 2、实例代码,亲测可用 ...
分类:
编程语言 时间:
2019-07-02 16:24:23
阅读次数:
153
import os # 登录状态 status_dic = { 'username': None, 'status': False } flag = True # 用户名,密码 以字典形式打开 def user_pwd(): with open("user", encoding="utf-8") a... ...
分类:
其他好文 时间:
2019-07-01 21:30:49
阅读次数:
129
将文本文件中指定的字符串替换成新字符串。 由于目前的OJ系统暂时不能支持用户读入文件,我们编写程序从键盘输入文件中的内容,当输入的一行为end时,表示结束。end后面有两个字符串,要求用第二个字符串替换文本中所有的第一个字符串。 将文本文件中指定的字符串替换成新字符串。 由于目前的OJ系统暂时不能支 ...
分类:
其他好文 时间:
2019-07-01 18:31:38
阅读次数:
264
可以采用dml触发器,如 CREATE OR REPLACE TRIGGER tr_capt_sql BEFORE DELETE OR INSERT OR UPDATE ON manager.test DECLARE sql_text ora_name_list_t; state_sql capt$ ...
分类:
数据库 时间:
2019-07-01 14:08:59
阅读次数:
193
可以利用登录触发器,如 CREATE OR REPLACE TRIGGER tr_login_record AFTER logon ON DATABASE DECLARE miUserSid NUMBER; mtSession v$session%ROWTYPE; CURSOR cSession(i ...
分类:
数据库 时间:
2019-07-01 13:54:14
阅读次数:
128
建立逻辑路径 create or replace directory dumpdir as 'c:\'; grant read,write on directory dumpdir to scott; 倒入/出 expdp newdr/123456@hncrm directory=test dump ...
分类:
数据库 时间:
2019-07-01 10:56:23
阅读次数:
280