admin管理员组文章数量:1613401
NumPy provides fundamental structures and tools that makes working with data easier, but there are several things that limit its usefulness as a single tool when working with data:
· The lack of support for column names forces us to frame the questions we want to answer as multi-dimensional array operations.
· Support for only one data type per ndarray makes it more difficult to work with data that contains both numeric and string data.
· There are lots of low level methods, however there are many common analysis patterns that don’t have pre-built methods.
The pandas library provides solutions to all of these pain points and more. Pandas is not so much a replacement for NumPy as an extension of NumPy. The underlying code for pandas uses the NumPy library extensively, which means the concepts you’ve been learning will come in handy as you begin to learn more about pandas.
1. DataFrame.dtypes
similar to NumPy’s ndarray.dtype attribute, return information about the types of each column.
1.
2. DataFrame.loc[] A是label1列和label2列的所有行;B是label1列到label2列的所有列的所有元素
shortcuts:
3. Series.describe() : returns some descriptive statistics on the data contained within a specific pandas series
count: 非零数
unique:unique数
top:most common value
freq:most common value 的频率
4.add a new column:
5. boolean indexing.
本文标签: Pandafundamental
版权声明:本文标题:Panda Fundamental 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1728642966a1167345.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论