构造函数
DataFrame([data, index, columns, dtype, copy]) #构造数据框
属性和数据
DataFrame.axes #index: 行标签;columns: 列标签
DataFrame.as_matrix([columns]) #转换为矩阵
DataFrame.dtypes #返回数据的类型
DataFrame.ftypes #返回每一列的 数据类型float64:dense
DataFrame.get_dtype_counts() #返回数据框数据类型的个数
DataFrame.get_ftype_counts() #返回数据框数据类型float64:dense的个数
DataFrame.select_dtypes([include, include]) #根据数据类型选取子数据框
DataFrame.values #Numpy的展示方式
DataFrame.axes #返回横纵坐标的标签名
DataFrame.ndim #返回数据框的纬度
DataFrame.size #返回数据框元素的个数
DataFrame.shape #返回数据框的形状
DataFrame.memory_usage() #每一列的存储
类型转换
DataFrame.astype(dtype[, copy, errors]) #转换数据类型
DataFrame.copy([deep]) #deep深度复制数据
DataFrame.isnull() #以布尔的方式返回空值
DataFrame.notnull() #以布尔的方式返回非空值
索引和迭代
DataFrame.head([n]) #返回前n行数据
DataFrame.at #快速标签常量访问器
DataFrame.iat #快速整型常量访问器
DataFrame.loc #标签定位,使用名称
DataFrame.iloc #整型定位,使用数字
DataFrame.insert(loc, column, value) #在特殊地点loc[数字]插入column[列名]某列数据
DataFrame.iter() #Iterate over infor axis
DataFrame.iteritems() #返回列名和序列的迭代器
DataFrame.iterrows() #返回索引和序列的迭代器
DataFrame.itertuples([index, name]) #Iterate over DataFrame rows as namedtuples, with index value as first element of the tuple.
DataFrame.lookup(row_labels, col_labels) #Label-based “fancy indexing” function for DataFrame.
DataFrame.pop(item) #返回删除的项目
DataFrame.tail([n]) #返回最后n行
DataFrame.xs(key[, axis, level, drop_level]) #Returns a cross-section (row(s) or column(s)) from the Series/DataFrame.
DataFrame.isin(values) #是否包含数据框中的元素
DataFrame.where(cond[, other, inplace, …]) #条件筛选
DataFrame.mask(cond[, other, inplace, …]) #Return an object of same shape as self and whose corresponding entries are from self where cond is False and otherwise are from other.
DataFrame.query(expr[, inplace]) #Query the columns of a frame with a boolean expression.
二元运算
DataFrame.add(other[,axis,fill_value]) #加法,元素指向
DataFrame.sub(other[,axis,fill_value]) #减法,元素指向
DataFrame.mul(other[, axis,fill_value]) #乘法,元素指向
DataFrame.div(other[, axis,fill_value]) #小数除法,元素指向
DataFrame.truediv(other[, axis, level, …]) #真除法,元素指向
DataFrame.floordiv(other[, axis, level, …]) #向下取整除法,元素指向
DataFrame.mod(other[, axis,fill_value]) #模运算,元素指向
DataFrame.pow(other[, axis,fill_value]) #幂运算,元素指向
DataFrame.radd(other[, axis,fill_value]) #右侧加法,元素指向
DataFrame.rsub(other[, axis,fill_value]) #右侧减法