python熊猫图案_Python-熊猫

python熊猫图案

Python-熊猫 (Python - Pandas)



Advertisements
广告

Pandas is an open-source Python Library used for high-performance data manipulation and data analysis using its powerful data structures. Python with pandas is in use in a variety of academic and commercial domains, including Finance, Economics, Statistics, Advertising, Web Analytics, and more. Using Pandas, we can accomplish five typical steps in the processing and analysis of data, regardless of the origin of data — load, organize, manipulate, model, and analyse the data.

Pandas是一个开源Python库,它使用其强大的数据结构用于高性能数据处理和数据分析。 带有熊猫的Python已在各种学术和商业领域中使用,包括金融,经济学,统计,广告,Web分析等。 使用Pandas,无论数据的来源如何,我们都可以完成五个典型的数据处理和分析步骤-加载,组织,操纵,建模和分析数据。

Below are the some of the important features of Pandas which is used specifically for Data processing and Data analysis work.

以下是熊猫的一些重要功能,这些功能专门用于数据处理和数据分析工作。

熊猫的主要特点 (Key Features of Pandas)

  • Fast and efficient DataFrame object with default and customized indexing.

    快速有效的DataFrame对象,带有默认索引和自定义索引。
  • Tools for loading data into in-memory data objects from different file formats.

    用于将数据从不同文件格式加载到内存数据对象中的工具。
  • Data alignment and integrated handling of missing data.

    数据对齐和丢失数据的集成处理。
  • Reshaping and pivoting of date sets.

    重塑和设置日期集。
  • Label-based slicing, indexing and subsetting of large data sets.

    基于标签的切片,大数据集的索引和子集。
  • Columns from a data structure can be deleted or inserted.

    可以删除或插入数据结构中的列。
  • Group by data for aggregation and transformations.

    按数据分组以进行汇总和转换。
  • High performance merging and joining of data.

    高性能的数据合并和联接。
  • Time Series functionality.

    时间序列功能。

Pandas deals with the following three data structures −

熊猫处理以下三个数据结构-

  • Series

    系列
  • DataFrame

    数据框

These data structures are built on top of Numpy array, making them fast and efficient.

这些数据结构建立在Numpy数组之上,从而使它们快速有效。

尺寸说明 (Dimension & Description)

The best way to think of these data structures is that the higher dimensional data structure is a container of its lower dimensional data structure. For example, DataFrame is a container of Series, Panel is a container of DataFrame.

考虑这些数据结构的最佳方法是,高维数据结构是其低维数据​​结构的容器。 例如,DataFrame是Series的容器,Panel是DataFrame的容器。

Data Structure Dimensions Description
Series 1 1D labeled homogeneous array, size-immutable.
Data Frames 2 General 2D labeled, size-mutable tabular structure with potentially heterogeneously typed columns.
数据结构 外型尺寸 描述
系列 1个 一维标记的均质阵列,大小不变。
数据框 2 具有潜在异构类型列的常规2D标记,大小可变的表格结构。

DataFrame is widely used and it is the most important data structures.

DataFrame被广泛使用,它是最重要的数据结构。

系列 (Series)

Series is a one-dimensional array like structure with homogeneous data. For example, the following series is a collection of integers 10, 23, 56, …

系列是具有均匀数据的一维数组状结构。 例如,以下系列是整数10、23、56的集合...

10 23 56 17 52 61 73 90 26 72
10 23 56 17 52 61 73 90 26 72

系列要点 (Key Points of Series)

  • Homogeneous data

    同类数据
  • Size Immutable

    大小不变
  • Values of Data Mutable

    数据可变值

数据框 (DataFrame)

DataFrame is a two-dimensional array with heterogeneous data. For example,

DataFrame是具有异构数据的二维数组。 例如,

Name Age Gender Rating
Steve 32 Male 3.45
Lia 28 Female 4.6
Vin 45 Male 3.9
Katie 38 Female 2.78
名称 年龄 性别 评分
史蒂夫 32 3.45
利亚 28 4.6
45 3.9
凯蒂 38 2.78

The table represents the data of a sales team of an organization with their overall performance rating. The data is represented in rows and columns. Each column represents an attribute and each row represents a person.

该表表示组织的销售团队的数据及其总体绩效等级。 数据以行和列表示。 每列代表一个属性,每行代表一个人。

列的数据类型 (Data Type of Columns)

The data types of the four columns are as follows −

四列的数据类型如下-

Column Type
Name String
Age Integer
Gender String
Rating Float
类型
名称
年龄 整数
性别
评分 浮动

数据框重点 (Key Points of Data Frame)

  • Heterogeneous data

    异构数据
  • Size Mutable

    大小可变
  • Data Mutable

    数据可变

We will see lots of examples on using pandas library of python in Data science work in the next chapters.

在下一章中,我们将在数据科学工作中看到许多使用python的pandas库的示例。

Advertisements
广告

翻译自: https://www.tutorialspoint.com/python_data_science/python_pandas.htm

python熊猫图案

相关文章: