scrapy框架
scrapy 练手案例spider12345678910111213141516171819202122232425262728293031import scrapy,refrom ..items import DangdangItemclass PythonbookSpider(scrapy.Spider): name = "pythonbook" start_urls = ["http://search.dangdang.com/?key=python&act=input"] p = 1 def parse(self, response): disc = response.xpath(".//ul[@class='bigimg']/li") item = DangdangItem() for date in disc: item['name'] = date.xpath("./a ...
echarts异步数据加载,事件,主题,多表联动
异步加载数据
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687<!DOCTYPE html><!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <script src="../echarts.js"></script&g ...
pyecharts个别图
1.散点图
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192from pyecharts.charts import Scatter, Gridfrom pyecharts import options as optsimport pandas as pd;data = pd.read_csv("./Ad_sales.csv")tv_data = list(data.iloc[0:]["TV"])radio_data = list(data.iloc[0:]["radio"])newspaper_data =list(data.iloc[0:]["newspaper"])sales_data = list(da ...
Apache POI
Apache POI是一个处理MiscrosoftOffice各种文件格式的开源项目。角度来说就是,我们可以使用POI在java程序中对MiscrosoftOffice各种文件进行读写操作一般情况下,poi都是用于操作excel文件
直接上例子1234567891011121314151617181920212223242526272829303132333435363738394041424344454647@Override public void export(HttpServletResponse response) { LocalDate begin = LocalDate.now().minusDays(30); LocalDate end = LocalDate.now().minusDays(1); BusinessDataVO businessDataVO = workSpaceService.businessDataVOResult(LocalDateTime.of(begin, LocalTime.MIN), Lo ...
webSocket
WebSocketwebSocket是基于TCP的一种新的网络协议。他实习了浏览器与服务器全双工通信—浏览器和服务器只需要完成一次握手,两者之间就可以创建持久性的连接,并进行双向数据传输
解析当前端发送请求websocket.send(message); 后端的@onMessage方法会被调用,当后端session.getBasicRemote().sendText(message);发送请求,前端的 websocket.onmessage 回被调用
前端123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869<!DOCTYPE HTML><html><head> <meta charset="UTF-8"> <title>WebSocket Demo</title></head ...
springboot-task
SpringTast框架cron表达式导入坐标注解用法
pandas入门
pandas入门读取/存储文件(1) 打开csv文件:titanic = pd.read_csv(“路径/文件.csv”)(2) 存储excel文件:titanic.to_excel(“路径/文件.xlsx”,sheet_name=”passengers”,index=False)命名名为”passengers”的工作簿,通过索引标签不会存在电子表格中(3) 打开excel文件:titanic = pd.read_excel(“路径/文件.xlsx”,sheet_name=”passengers”)打开passengers工作簿
选择列
选择1列:age = titanic[“age”]
选取多列:age_sex = titanic[[“age”,”sex”]]
数据筛选
筛选 35岁以上的乘客的所有信息:above_35 = titanic[titanic[“age”]<35]
选出级别为2和3的数据:(1)class_23=titanic[tit ...