摘要: 1 import pandas 2 excel=pandas.read_excel('name.xlsx') 3 4 #这里的n是指保留前几列,默认为0或者1,意思是全部保留,expand指是否扩展,默认为False 5 d=excel['name'].str.split(n=0,expand=Tr 阅读全文
posted @ 2020-06-12 12:19 马蹄哒哒 阅读(350) 评论(0) 推荐(0)
摘要: 1 import pandas 2 3 #定义数据效验函数 4 def score_validation(row): 5 try: 6 assert 0<=row['score']<=100 7 except: 8 print(row['sid'],row['name'],row['score']) 阅读全文
posted @ 2020-06-12 12:18 马蹄哒哒 阅读(158) 评论(0) 推荐(0)
摘要: (一)merge 1 merge(left, right, how='inner', on=None, left_on=None, right_on=None, 2 left_index=False, right_index=False, sort=True, 3 suffixes=('_x', ' 阅读全文
posted @ 2020-06-11 21:24 马蹄哒哒 阅读(402) 评论(0) 推荐(0)
摘要: 1 import pandas 2 from matplotlib import pyplot 3 4 pandas.options.display.max_columns=10 #最多显示多少列 5 6 excel=pandas.read_excel('revenue.xlsx') 7 8 pri 阅读全文
posted @ 2020-06-11 16:40 马蹄哒哒 阅读(125) 评论(0) 推荐(0)
摘要: 1 import pandas 2 from matplotlib import pyplot 3 4 pandas.options.display.max_columns=10 #最多显示多少列 5 6 excel=pandas.read_excel('revenue.xlsx') 7 8 9 # 阅读全文
posted @ 2020-06-11 16:35 马蹄哒哒 阅读(350) 评论(0) 推荐(0)
摘要: 1 import pandas 2 from matplotlib import pyplot 3 4 pandas.options.display.max_columns=10 #最多显示多少列 5 6 excel=pandas.read_excel('revenue.xlsx') 7 8 9 # 阅读全文
posted @ 2020-06-11 16:33 马蹄哒哒 阅读(127) 评论(0) 推荐(0)
摘要: 1 import pandas 2 from matplotlib import pyplot 3 4 pandas.options.display.max_columns=10 #最多显示多少列 5 6 excel=pandas.read_excel('revenue.xlsx') 7 print 阅读全文
posted @ 2020-06-11 15:14 马蹄哒哒 阅读(145) 评论(0) 推荐(0)
摘要: MySQL数据库中提供了很丰富的函数。MySQL函数包括数学函数、字符串函数、日期和时间函数、条件判断函数、系统信息函数、加密函数、格式化函数等。通过这些函数,可以简化用户的操作。例如,字符串连接函数可以很方便的将多个字符串连接在一起。在这一讲中将讲解的内容包括:数学函数字符串函数日期和时间函数条件 阅读全文
posted @ 2020-06-10 21:36 马蹄哒哒 阅读(150) 评论(0) 推荐(0)
摘要: --创建触发器 delimiter //create trigger 触发器名 before(after) insert(update,delete) on t1 for each rowbegindeclare a varchar(20);declare b varchar(20);set a=( 阅读全文
posted @ 2020-06-10 21:33 马蹄哒哒 阅读(134) 评论(0) 推荐(0)
摘要: --创建视图(视图是虚拟存在的,不能向其中插入数据) create view 视图名 as select * from student; --修改视图 alter view 视图名 as sql语句; 阅读全文
posted @ 2020-06-10 21:09 马蹄哒哒 阅读(96) 评论(0) 推荐(0)