![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
你好世界wxx
Just do it!
展开
-
jupyter notebook的安装与使用
jupyter notebook的安装与使用1 安装Jupyter Notebook是基于网页的用于交互计算的应用程序。其可被应用于全过程计算:开发、文档编写、运行代码和展示结果。—— Jupyter Notebook官方介绍。官网:网址。配置好python环境后,使用如下命令进行安装:pip install jupyter notebook2 使用2.1 修改默认的工作目录首先打开cmd,输入如下命令:jupyter notebook --generate-con原创 2021-07-08 11:21:31 · 699 阅读 · 1 评论 -
【python】文件读取
Python之文件读取1. txt文件的读写1.1 每行数据不是纯文字(除表头外)测试用的文本文件名称为:test1.txt,文件绝对路径为D:\test1.txt。文件内容如下:id,name,sex,age,salary1,tom,male,21,25000.02,alice,female,18,12000.0# 文本文件的处理: 每行数据不是纯数字def test01(): # 读取文件 filename = r"D:\test1.txt" filenam原创 2021-05-27 20:40:43 · 221 阅读 · 3 评论 -
【python】numpy库的使用
Python常用库之Numpynumpy的基本使用# 为什么需要使用numpy?# 因为python中的list效率比较低(需要检查每个元素类型)# import array 中的array很多函数没提供,不方便# numpy的基本使用def test01(): arr1 = np.array([i for i in range(5)]) # [0 1 2 3 4] arr1[3] = 7.8 # 小数点会直接去掉,向下取整 [0 1 2 7 4] print原创 2021-05-25 11:00:41 · 209 阅读 · 0 评论 -
【python】matplotlib库的使用
matplotlib常用绘图参考自:嵩天老师的《python数据分析与展示》1. 折线图"""plt.plot(x, y, format_string, **kwargs)x : X轴数据,列表或数组,可选y : Y轴数据,列表或数组format_string : 控制曲线的格式字符串,可选,详情请参照最后的说明**kwargs : 第二组或更多(x,y,format_string)当绘制多条曲线时,各条曲线的x不能省略"""import matplot原创 2021-03-26 10:35:52 · 263 阅读 · 0 评论 -
【python】基础知识
Python基础知识数字类型及操作# 数字类型及操作def test1(): # 整数类型: 大小无限制 a = 1010 # 10进制 b = 0b101 # 二进制 c = 0o456 # 八进制 d = 0x9a # 十六进制 print(a, b, c, d, sep=", ") # 均是以10进制输出 print("a的二进制表示:", bin(a)) print("a的八进制表示:", oct(a)) pri原创 2021-05-18 17:27:09 · 462 阅读 · 0 评论