DataFrame

Posted dreamafar

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了DataFrame相关的知识,希望对你有一定的参考价值。

DataFrame

Constructor

DataFrame([data, index, columns, dtype, copy])

Two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns).

 

Axes

  • index: row labels
  • columns: column labels

DataFrame.as_matrix([columns])

Convert the frame to its Numpy-array representation.

DataFrame.dtypes

Return the dtypes in this object.

DataFrame.ftypes

Return the ftypes (indication of sparse/dense and dtype) in this object.

DataFrame.get_dtype_counts()

Return the counts of dtypes in this object.

DataFrame.get_ftype_counts()

Return the counts of ftypes in this object.

DataFrame.select_dtypes([include, exclude])

Return a subset of a DataFrame including/excluding columns based on their dtype.

DataFrame.values

Numpy representation of NDFrame

DataFrame.axes

Return a list with the row axis labels and column axis labels as the only members.

DataFrame.ndim

Number of axes / array dimensions

DataFrame.size

number of elements in the NDFrame

DataFrame.shape

Return a tuple representing the dimensionality of the DataFrame.

DataFrame.memory_usage([index, deep])

Memory usage of DataFrame columns.

以上是关于DataFrame的主要内容,如果未能解决你的问题,请参考以下文章

python学习

DataFrame基础知识

机器学习入门 05 —— Pandas使用

Python机器学习入门——科学计算库(Pandas)

利用python进行数据分析——pandas与索引

Pandas文档学习