- 博客(5)
- 收藏
- 关注
原创 R语言学习-基础
1、基础getwd()#获得当前目录setwd(dir = 'c:/User/ql/wd')#设置新的工作目录list.files()#查看当前目录下的文件有哪些x <- 5# x = 5,R 语言中使用<-来赋值 x <<- 5#将5强制赋值给x2.安装安装包install.packages(‘’)#括号里面加包的名字3、使用包library(vad)#调用vcd包4、帮助help(package='vcd')5.向量向量在R语言中
2021-02-18 15:02:39
3010
原创 19行代码爬取-全职高手-音频
水平有限 见谅import requestsfrom bs4 import BeautifulSoupnumber = 1for iii in range(0,1000): URL = 'http://www.ting89.com/down/?12828-'+str(number)+'.html' res = requests.get(URL) html = res.content soup = BeautifulSoup(html,'html.parser')
2020-10-16 10:44:30
260
1
原创 卡方检验
import osimport pandas as pdos.getcwd()os.chdir(r'C:\Users\ql\Desktop')order = pd.read_excel('zhong1.xlsx',encoding = 'utf-8',dtype={'kong':str,'er':str})#打开文件cross = pd.crosstab(order.性别,order.寿命,margins=True)#选择两个要检验的对象from scipy import stats.
2020-05-15 19:42:12
397
原创 matplotlib绘图基础
一、绘图基础1、基础部分import numpy as npimport matplotlib.pyplot as plt%matplotlib inline#确保图形可以展示出来x = np.linspace(0,100,1000)y = np.sin(x)plt.plot(x,y,c='red',lw = 2,ls ='-')#lw:线宽。ls:线的形状plt.show()...
2020-04-17 22:48:47
368
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人