DataFrame的这些操作和Series很相似,这里简单介绍一下。 一,应用 apply()函数应用于轴级别,applymap应用于元素级别: 定义一个函数fun,使用apply()函数把fun应用到由DataFrame对象的列构成的一维数组上,通常fun函数是由聚合函数构成的。 定义一个函数fo ...
分类:
其他好文 时间:
2019-10-08 14:28:46
阅读次数:
169
[TOC] Series Series([], dtype: float64) 0 1 1 2 2 3 dtype: int64 0 1.0 1 2.0 2 3.0 dtype: float64 0 1.0 1 2.0 2 3.0 dtype: float64 我们可以看到,如果我们不指定dtype ...
分类:
其他好文 时间:
2019-10-07 23:13:43
阅读次数:
121
5.2 基本功能 (1)重新索引 - 方法reindex 方法reindex是pandas对象地一个重要方法,其作用是:创建一个新对象,它地数据符合新地索引。 如,对下面的Series数据按新索引进行重排: 根据新索引重排后的结果如下,当某个索引值不存在,就会在原来的基础上引入缺失值NaN: 利用r ...
分类:
编程语言 时间:
2019-10-07 21:24:56
阅读次数:
141
File Upload: A file is a series of characters. Uploading a file is the opposite of downloading a file. Therefore to transfer a file we need to: 1. Rea ...
分类:
编程语言 时间:
2019-10-07 11:18:32
阅读次数:
84
Browse Princeton's Series (by Date) in Princeton Economic History of the Western World Joel Mokyr, Series Editor Titles in the Princeton Economic Hist ...
分类:
其他好文 时间:
2019-10-07 00:53:19
阅读次数:
145
pandas入门之DataFrame 创建DataFrame - DataFrame是一个【表格型】的数据结构。DataFrame由按一定顺序排列的多列数据组成。设计初衷是将Series的使用场景从一维拓展到多维。DataFrame既有行索引,也有列索引。 - 创建DataFrame的方式 - 列表 ...
分类:
其他好文 时间:
2019-10-05 14:49:35
阅读次数:
95
pandas入门之Series 一、创建Series 参数 - Series (Series)是能够保存任何类型的数据(整数,字符串,浮点数,Python对象等)的一维标记数组。轴标签统称为索引。 - data 参数 - index 索引 索引值必须是唯一的和散列的,与数据的长度相同。 默认np.a ...
分类:
其他好文 时间:
2019-10-05 14:18:57
阅读次数:
84
An overview of time series forecasting models 2019-10-04 09:47:05 This blog is from: https://towardsdatascience.com/an-overview-of-time-series-forecas ...
分类:
其他好文 时间:
2019-10-04 09:26:49
阅读次数:
197
import tushare as ts import pandas as pd from pandas import DataFrame,Series import tushare as ts import pandas as pd from pandas import DataFrame,Ser ...
分类:
编程语言 时间:
2019-09-30 12:49:01
阅读次数:
90
Pandas是一个基于NumPy的库,为python提供了易用的数据结构和数据分析工具。 导入 Pandas数据结构 Series 一维的有标签的数组,可以容纳任何类型的数据。 DataFrame 二维的有标签的数据结构,每一列都可能有不同的类型 筛选数据 丢弃数据 排序 获取数据的信息 基础信息 ...
分类:
其他好文 时间:
2019-09-29 22:08:44
阅读次数:
160