摘要: 1 import numpy as np 2 # 手动创建数组 3 # array = np.array([1,2,3]) 4 # array = np.array([[1,2,3],[4,5,6]],dtype=int) 5 # array = np.array([[1,2,3],[4,5,6]] 阅读全文
posted @ 2021-03-08 11:28 大数据程序员 阅读(554) 评论(0) 推荐(0) 编辑
摘要: 1、所谓的列表推导式,就是指的轻量级循环创建列表: a = [i for i in range(1,10)] # [1, 2, 3, 4, 5, 6, 7, 8, 9] b= [11 for i in range(1,10)] # [11, 11, 11, 11, 11, 11, 11, 11, 1 阅读全文
posted @ 2021-03-08 11:27 大数据程序员 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 一、创建数据库实例 1 from pymysql import * 2 # 创建数据库实例 3 #1.建立数据库连接 4 conn = connect(host="192.168.20.101",user="root",password="123456") 5 # 2.获取游标对象 6 mycur 阅读全文
posted @ 2021-03-08 11:26 大数据程序员 阅读(2832) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/wuning/p/12595930.html#4815290 阅读全文
posted @ 2021-03-07 22:09 大数据程序员 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 安装步骤: 一、在cmd中输入%HOMEPATH%目录打开,查看是否有 .condarc 文件,没有 .condarc 文件的话,新建一个 .condarc 文件,文件中的内容如下: channels: - http://mirrors.tuna.tsinghua.edu.cn/anaconda/p 阅读全文
posted @ 2021-03-07 16:40 大数据程序员 阅读(1976) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/yuxuefeng/articles/9235431.html 阅读全文
posted @ 2021-03-04 19:12 大数据程序员 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 【1】数据 文件vpnlog 数据如下 {"userName":"a","ts":"2020-04-07T00:12:02.000Z","type":"logout"} {"userName":"a","ts":"2020-04-07T00:25:36.000Z","type":"login"} { 阅读全文
posted @ 2021-03-04 17:22 大数据程序员 阅读(565) 评论(0) 推荐(0) 编辑
摘要: 【1】数据 文件 registuser.csv 数据如下 uid,regist_day,regist_os u1,20200401,android u2,20200401,iphone u3,20200401,android u4,20200402,iphone u5,20200402,androi 阅读全文
posted @ 2021-03-04 16:54 大数据程序员 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 根据用户访问网站的浏览时长统计以下信息:1、统计每个用户每天访问网站的总时长(当天总时长是累加之前日期的)2、统计每个用户当前天及前一天访问网站总时长3、统计每个用户当前天访问的网站时长(当前天统计的时长除了当前天访问的总时长还包含前一天和后一天的访问总时长)4、统计每个用户访问网站的总时长【1】数 阅读全文
posted @ 2021-03-04 16:36 大数据程序员 阅读(637) 评论(0) 推荐(0) 编辑
摘要: 【1】数据 文件 rowcolumnData 数据如下 username,item,price zhangsan,A,1 zhangsan,B,2 zhangsan,C,3 lisi,A,4 lisi,C,5 zhangsan,D,6 lisi,B,7 wangwu,C,8 【2】scala代码实现 阅读全文
posted @ 2021-03-04 16:30 大数据程序员 阅读(121) 评论(0) 推荐(0) 编辑