摘要: import numpy as np import pandas as pd x = pd.Series([1, 3, 5, np.nan]) print(x) 阅读全文
posted @ 2019-04-22 11:28 辰光依旧 阅读(103) 评论(0) 推荐(0) 编辑
摘要: import as pd import numpy as np import matplotlib.pyplot as plt #df.to_excel('C:Users/history/Desktop/Python成绩.xlsx', sheet_name='dfg') df = pd.read_excel('C:/Users/history/Desktop/Python成绩.xlsx',... 阅读全文
posted @ 2019-04-22 11:08 辰光依旧 阅读(213) 评论(0) 推荐(0) 编辑
摘要: from PIL import Image im0=np.array(Image.open('D:/26卢英倩/123.jpg').convert('L')) im1=255-im0 im2=(100/250)*im0+150 im3=255*(im1/255)**2 pil_im=Image.fromarray(np.uint(im1)) pil_im.show() # -*- ... 阅读全文
posted @ 2019-04-21 21:16 辰光依旧 阅读(255) 评论(0) 推荐(0) 编辑
摘要: matplotlib绘图总结 本文作为学习过程中对matplotlib一些常用知识点的整理,方便查找。 类MATLAB API 最简单的入门是从类 MATLAB API 开始,它被设计成兼容 MATLAB 绘图函数。 from pylab import * from numpy import * x 阅读全文
posted @ 2019-04-21 20:10 辰光依旧 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Numpy numpy(Numerical Python extensions)是一个第三方的Python包,用于科学计算。这个库的前身是1995年就开始开发的一个用于数组运算的库。经过了长时间的发展,基本上成了绝大部分Python科学计算的基础包,当然也包括所有提供Python接口的深度学习框架。 阅读全文
posted @ 2019-04-21 20:02 辰光依旧 阅读(145) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ import numpy as np import matplotlib.pyplot as plt import matplotlib ma 阅读全文
posted @ 2019-04-21 19:49 辰光依旧 阅读(193) 评论(0) 推荐(0) 编辑
摘要: import numpy as np import matplotlib.pyplot as plt x=np.linspace(0,6,100) y=np.cos(2*np.pi*x)*np.exp(-x)+0.8 plt.plot(x,y,'k',color='r',linewidth=3,linestyle='-') plt.show() import matplotlib.pypl... 阅读全文
posted @ 2019-04-15 12:49 辰光依旧 阅读(231) 评论(0) 推荐(0) 编辑
摘要: import re x = input('Please input a string:') pattern = re.compile(r'\b[a-zA-Z]{3}\b') print(pattern.findall(x)) 阅读全文
posted @ 2019-04-14 15:41 辰光依旧 阅读(1546) 评论(0) 推荐(0) 编辑
摘要: Python 面向对象 Python从设计之初就已经是一门面向对象的语言,正因为如此,在Python中创建一个类和对象是很容易的。本章节我们将详细介绍Python的面向对象编程。 如果你以前没有接触过面向对象的编程语言,那你可能需要先了解一些面向对象语言的一些基本特征,在头脑里头形成一个基本的面向对 阅读全文
posted @ 2019-04-14 15:25 辰光依旧 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Python 正则表达式 正则表达式是一个特殊的字符序列,它能帮助你方便的检查一个字符串是否与某种模式匹配。 Python 自1.5版本起增加了re 模块,它提供 Perl 风格的正则表达式模式。 re 模块使 Python 语言拥有全部的正则表达式功能。 compile 函数根据一个模式字符串和可 阅读全文
posted @ 2019-04-14 15:12 辰光依旧 阅读(180) 评论(0) 推荐(0) 编辑