![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
利用python进行数据分析
csdn_lzw
这个人很菜什么也没写
展开
-
Numpy基础:数组和矢量计算
ndarray:多维数组对象1.创建ndarray创建数组最简单的方法是使用array 函数。它接受一切序列型的对象。import numpy as npdata1 = [6,7.5,8,0,1]arr1 = np.array(data1)arr1Out[4]: array([ 6. , 7.5, 8. , 0. , 1. ])每一个数组都有一个 shape 和一个 dtypearr1.s原创 2017-07-29 16:42:31 · 484 阅读 · 0 评论 -
Pandas 入门
Series一种类似于一维数组的对象 Series 有values 和 index 属性 Series可以看成定长的有序字典 Series对象本身及其索引都有以一个name属性 DataFrame表格型数据结构 最常用的构建方法:直接传入一个由等长列表或Numpy 数组组成的字典原创 2017-10-27 09:33:09 · 611 阅读 · 2 评论 -
pandas
1.rest_index当对DataFrame数据进行删除缺失值后,需要对其index进行调整:将reset_index的drop值设置为False表示重新排index从0开始,一般是不进行调整的,这样可以保持原有的数据索引。dates = pd.date_range('20130101',periods=6)df = pd.DataFrame(np.random.randn(6,4),ind原创 2018-02-03 21:19:17 · 244 阅读 · 0 评论