小渣渣学习笔记 python数据分析(pandas)【待续。。。】
摘要:chapter1 :Pandas DataFrame 基础知识 2021.6.22 一、加载数据集 #read_csv 函数加载csv文件(head取前5条) import pandas df = pandas.read_csv('students.csv') print(df.head()) cu
阅读全文
posted @
2021-06-22 16:56
94小渣渣
阅读(217)
推荐(0)
小渣渣学习笔记 python day65【numpy 2】
摘要:numpy 数组array 1、数组的创建和类型dtype #可以用arange创建数组 import numpy as np t1 = np.arange(12) t1 array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) #用array创建numpy t2
阅读全文
posted @
2020-10-29 17:49
94小渣渣
阅读(195)
推荐(0)
小渣渣学习笔记 python day62【pandas】
摘要:Series import pandas as pd import numpy as np s = pd.Series(np.random.randn(5),index=['a','b','c','d','e']) #创建序列Series s a 1.172374 b 1.465648 c 0.11
阅读全文
posted @
2020-10-13 17:29
94小渣渣
阅读(145)
推荐(0)
小渣渣学习笔记 python day60【pandas3 索引 迭代 二元运算 函数应用】
摘要:感觉方法不对,DataFrame 100多个属性和方法,例子都敲一遍也记不住,常用的可能那么几个,不如先总览,看1个例子,看不懂就过,用实际的事情处理来找DataFrame的方法,以下的那么多方法都敲完了,第二天还是记不住的。感觉已经乱了,numpy pandas matplotlab 都是针对数据
阅读全文
posted @
2020-09-21 18:12
94小渣渣
阅读(220)
推荐(0)
小渣渣学习笔记 python day59【pandas2 iloc insert() items() iteritems() keys() iterrows() pop()tail() xs()】
摘要:pandas.DataFrame index & iteration import numpy as np import pandas as pd d = {'name':['tom','jerry','lucy'],'age':[24,22,21],'sex':['male','male','fe
阅读全文
posted @
2020-09-20 22:51
94小渣渣
阅读(212)
推荐(0)
小渣渣学习笔记 python day58【numpy pandas 初识】
摘要:numpy pandas 初识 #array import numpy as np array = np.array([[1,2,3],[4,5,6]]) print(array) print(array.size) #输出大小 6个元素 print(array.shape) #输出形状 (2,3)
阅读全文
posted @
2020-09-18 18:18
94小渣渣
阅读(187)
推荐(0)