pandas module 1 - 0.简介
来源:互联网 发布:淘宝助理一键复制宝贝 编辑:程序博客网 时间:2024/05/29 15:49
0. Overview
1. pandas consists of the following things:- A set of labeled array data structures, the primary of which areSeries and DataFrame
- Index objects enabling both simple axis indexing and multi-level / hierarchical axis indexing
- An integrated group by engine for aggregating and transforming data sets
- Date range generation (date_range) and custom date offsets enabling the implementation of customized frequencies
- Input/Output tools: loading tabular data from flat files (CSV, delimited, Excel 2003), and saving and loading pandas objects from the fast and efficient PyTables/HDF5 format.
- Memory-efficient “sparse” versions of the standard data structures for storing data that is mostly missing or mostly constant (some fixed value)
- Moving window statistics (rolling mean, rolling standard deviation, etc.)
- Static and moving window linear and panel regression
Dimensions Name Description
We can insert and remove objects from these containers in a dictionary-like fashion.
With tabular(列表) data (DataFrame) it is more helpful to think of the index (the rows) and the columns rather than axis 0 and axis 1(readable code).
All pandas data structures are value-mutable(值可变) but not always size-mutable(尺寸不可变).
1. Object Creation
1. Creating a Series by passing a list of values, letting pandas create a default integer index:2. Creating a DataFrame by passing a numpy array, with a datetime index andlabeled columns:
3. Creating a DataFrame by passing a dict of objects:
2. Viewing Data
1. See the top & bottom rows of the frame:2. Display the index, columns, and the underlying numpy data:
3. operate the data:
3. Selection
the methods like these : .at,.iat, .loc, .iloc and .ix.(1) slecting
(2) using label
(3) by position
(4)boolean indexing
(5)setting values
4. Missing Data
(1)pandas primarily uses the value np.nan to represent missing data.
(2)drop any rows that have missing data
(3)Filling missing data
(4)get the boolean mask where values are nan
5. Operations
Operations in general exclude missing data.(1)Stats(状态信息)
(2)Apply :Apply functions to the data.
(3)Histogramming(直方图)
(4)String Methods
Series is equipped with a set of string processing methods in the strattribute.
6. Merge
1. Concat(2) Join like SQL.
(3)Append rows
7. Grouping
following these steps:
- Splitting the data into groups based on some criteria
- Applying a function to each group independently
- Combining the results into a data structure
8. Reshaping
(1)Stack:With a “stacked” DataFrame or Series (having a MultiIndex as the index), the inverse operation of stack() is unstack().(2) Pivot Tables(关键表)
9. Time Series
(1)common usage(2)zone(时区) representation
(3)时间跨度表达
10. Categoricals(分类)
11. Plotting
(1)例1(2)例2:On DataFrame, plot() is a convenience to plot all of the columns with labels:
12. Getting Data In/Out
(1)CSV(2)HDF5
(3)Excel
- pandas module 1 - 0.简介
- pandas module 1 - cookbook
- pandas学习笔记(1)--pandas简介
- pandas库简介(1)--pandas的三种数据结构
- ImportError: No module named 'pandas'
- Module简介
- Pandas用法入门简介
- 一、pandas系列---pandas库简介
- module 'pandas' has no attribute 'computation'
- Pandas 中文文档:数据结构简介
- linux module简介
- AngularJs module模块简介
- pandas 1
- 错误及解决办法:trackback (most recent call last) File “XXX文件路径” ,line 1, in <module> import pandas as pd
- TensorFlow运行错误,AttributeError: module 'pandas' has no attribute 'computation'
- pandas报错AttributeError: 'module' object has no attribute 'plotting'
- UTM(Urchin Tracking Module)简介
- python不同module功能简介
- 详解Lua中的元表概念
- 把天聊死是一种怎样的感觉
- Linux-ACL相关设置
- Jprofile(一) - 连接本地服务器
- 怎样在Android Studio中导入Module
- pandas module 1 - 0.简介
- 面试题24:二叉搜索树的后序遍历序列
- ATOM基础教程一atom-autocomplete-php配置(14)
- Xcode 插件管理器 -- Alcatraz
- String,StringBuffer与StringBuilder的区别??
- retrofit2 使用教程 及 Android 网络架构搭建 (原创)
- eclilpse导入dorado项目运行失败
- 哪里可以获取Sigmaplot 13 破解版
- NO2 类与方法