自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 收藏
  • 关注

原创 机器学习--特征工程

特征工程初级处理

2022-06-02 22:39:49 80

原创 pyecharts阶段2

import jsonfrom pandas import json_normalizefrom pyecharts import options as optsfrom pyecharts.charts import Funnel #漏斗图op1=open(r'shoes.json','r',encoding='utf-8')#print(op1)li=[]dict={}for i in op1: k=json.loads(i.encode("utf-8"))#把字符串转换.

2022-04-26 21:48:03 122

原创 pyecharts第一部分

from pyecharts.charts import Barfrom pyecharts import options as optsfrom pyecharts.globals import ThemeTypebar = Bar(init_opts=opts.InitOpts(theme="essos",renderer="RenderType.SVG"))#render设置渲染格式bar.add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"]).

2022-04-09 09:36:13 91

原创 stage2——6

import pandas as pdfrom matplotlib import pyplot as pltimport numpy as npdf = pd.read_csv("./911.csv")#添加列,表示分类tem_list = df["title"].str.split(": ").tolist()cate_list = [i[0] for i in tem_list]df["cate"] = pd.DataFrame(np.array(cate_list).reshape.

2021-08-14 13:22:55 77

原创 stage2——05

import pandas as pdfrom matplotlib import pyplot as pltimport numpy as npfile_path = "IMDB-Movie-Data.csv"df = pd.read_csv(file_path)#统计分类的列表tem_list = df["Genre"].str.split(",").tolist()genre_list = list(set([i for j in tem_list for i in j]))#构造全.

2021-08-12 23:25:15 45

原创 stage2_4

import pandas as pdt1 = pd.Series([1,2,31,12,45,3])print(t1)print(type(t1))t2 = pd.Series([12,13,14,15,16],index=list("abcde"))print(t2)tem_dict= {"name":"zhangsan","age":18,"tel":10086}t3 = pd.Series(tem_dict)print(t3)print(t2.dtype)print(t3.

2021-08-10 23:41:41 54

原创 stage2_03

import numpy as npimport random#使用numpy生成数组t1 = np.array([1,2,3,4])print(t1)print(type(t1))t2 = np.array(range(10))print(t2)print(type(t2))t3 = np.arange(10)print(t3)print(type(t3))print(t3.dtype)#numpy中的数据类型t4 = np.array(range(1,4),dtype.

2021-08-09 17:29:07 41

原创 stage2——2

#绘制条形图,使用barfrom matplotlib import pyplot as pltfrom matplotlib import font_managermy_font = font_manager.FontProperties(fname ="C:/Windows/Fonts/simsun.ttc")a = ["战狼2","速度与激情8","功夫瑜伽","西游伏妖篇","变形金刚5:最后的骑士","摔跤吧!爸爸","加勒比海盗5:死无对证","金刚:骷髅岛","极限特工:终极回归.

2021-08-08 00:01:19 57

原创 stage2_01

from matplotlib import pyplot as pltx = range(2,26,2)y = [15,13,14.5,17,20,25,26,26,27,22,18,15]#设置图形大小及分辨率plt.figure(figsize=(20,8),dpi=(80))#绘制图形plt.plot(x,y)#设置X,Y轴_xticks_labels = [i/2 for i in range(4,49)]plt.xticks(range(2,25,))plt.yti.

2021-08-06 18:19:26 368

原创 第十一天作业

from distutils.core import setupsetup( name= "baizhanSuperMath" #对外我们模块的名字 version = "1.0" #版本号 description = "这是对外发布的第一个模块,里面仅是测试" #描述 author = "zhangsan" #作者 author_email = "1234567@163.com" #作者联系方式 .

2021-07-13 16:27:26 42

原创 第十天作业

import ospath = os.getcwd()file_list = os.listdir(path) #列出子目录、子文件夹for filename in file_list: if filename.endswith("py"): print(filename,end="\t")print("##########################################")file_list2 = [filename for .

2021-07-12 21:39:04 57

原创 第九天作业

while True: try: x = int(input("请输入一个数字")) print("输入的数字",x) if x == 88: print("退出程序") break except BaseException as e: print(e) print("异常,输入的不是一个数字")print("循环数字输入程序结束")try: a .

2021-07-11 19:00:29 37

原创 第八天作业

class Person: def work(self): print("好好工作")def playgames(s): print("{0}在玩游戏".format(s))def work2(a): print("好好工作,好好赚钱")Person.play = playgamesp = Person()p.work()p.play()Person.work = work2p.work()#测试私有属性,私有方法class Stude.

2021-07-09 17:29:16 49

原创 第七天作业

#测试嵌套函数def outer(): print("outer running") def inner01(): print("inner01 running") inner01()outer()def printChinsesName(name,familyName): print("{0} {1}".format(familyName,name))def printEnglishName(name,familyName): pr.

2021-07-08 18:02:53 58

原创 第六天作业

#测试for循环for x in (20,30,40,50,60): print(x*3)for x in "abcdef": print(x*3)d = {"name":"张三","age":18,"city":"北京"}for x in d: print(x)for x in d.keys(): print(x)for x in d.values(): print(x)for x in d.items(...

2021-07-07 18:15:17 44

原创 第四天作业

#测试for循环for x in (20,30,40,50,60): print(x*3)for x in "abcdef": print(x*3)d = {"name":"张三","age":18,"city":"北京"}for x in d: print(x)for x in d.keys(): print(x)for x in d.values(): print(x)for x in d.items(): print(x).

2021-07-07 00:52:36 34

原创 第四天作业

a = {"name":"zhangsan","age":18,"dd":[3,4,5]}>>> a{'name': 'zhangsan', 'age': 18, 'dd': [3, 4, 5]}>>> b = dict(name="zhangsan",age=18)>>> c = dict([("name","zhangsan"),("age",18)])>>> c{'name': 'zhangsan', 'a

2021-07-05 19:39:43 160

原创 第三天作业

s = "hello,xlj">>> import io>>> sio = io.stringIO(s)Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> sio = io.stringIO(s)AttributeError: module 'io' has no attribute 'stringIO'>>> ...

2021-07-04 23:34:53 200

原创 第二天作业

import time>>> time.time()1625280241.9256263>>> b = int(time.time())>>> b1625280302>>>====================== RESTART: D:/pythonDLEfile/mypy04.py =====================Traceback (most recent call last): File "D:..

2021-07-03 17:17:24 69

原创 第一天作业

#绘制奥运五环import turtleturtle.width(10)turtle.color("blue")turtle.circle(50)turtle.penup()turtle.goto(120,0)turtle.pendown()turtle.color("black")turtle.circle(50)turtle.penup()turtle.goto(240,0)turtle.pendown()turtle.color("red")turtle.circ

2021-07-03 00:04:20 155

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除