Python酷库之旅-第三方库Pandas(037)
目录
一、用法精讲
116、pandas.Series.div方法
116-1、语法
116-2、参数
116-3、功能
116-4、返回值
116-5、说明
116-6、用法
116-6-1、数据准备
116-6-2、代码示例
116-6-3、结果输出
117、pandas.Series.truediv方法
117-1、语法
117-2、参数
117-3、功能
117-4、返回值
117-5、说明
117-6、用法
117-6-1、数据准备
117-6-2、代码示例
117-6-3、结果输出
118、pandas.Series.floordiv方法
118-1、语法
118-2、参数
118-3、功能
118-4、返回值
118-5、说明
118-6、用法
118-6-1、数据准备
118-6-2、代码示例
118-6-3、结果输出
119、pandas.Series.mod方法
119-1、语法
119-2、参数
119-3、功能
119-4、返回值
119-5、说明
119-6、用法
119-6-1、数据准备
119-6-2、代码示例
119-6-3、结果输出
120、pandas.Series.pow方法
120-1、语法
120-2、参数
120-3、功能
120-4、返回值
120-5、说明
120-6、用法
120-6-1、数据准备
120-6-2、代码示例
120-6-3、结果输出
二、推荐阅读
1、Python筑基之旅
2、Python函数之旅
3、Python算法之旅
4、Python魔法之旅
5、博客个人主页



一、用法精讲
116、pandas.Series.div方法
116-1、语法
# 116、pandas.Series.div方法
pandas.Series.div(other, level=None, fill_value=None, axis=0)
Return Floating division of series and other, element-wise (binary operator truediv).Equivalent to series / other, but with support to substitute a fill_value for missing data in either one of the inputs.Parameters:
other
Series or scalar value
level
int or name
Broadcast across a level, matching Index values on the passed MultiIndex level.fill_value
None or float value, default None (NaN)
Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result of filling (at that location) will be missing.axis
{0 or ‘index’}
Unused. Parameter needed for compatibility with DataFrame.Returns:
Series
The result of the operation.
116-2、参数
116-2-1、other(必须):标量、Series或DataFrame,表示要除以的值,可以是一个标量、另一个Series或DataFrame,如果是Series或DataFrame,则会根据索引进行对齐。
116-2-2、level(可选,默认值为None):一个整数或字符串,如果other是一个MultiIndex的Series或DataFrame,使用该参数可以指定索引的哪个层进行对齐,传入的值应该是层的级别的名称或位置(索引值)。
116-2-3、fill_value(可选,默认值为None):标量值,当对齐时,如果某个Series中的某个索引值在另一个Series中不存在,可以通过此参数提供一个填充值,以在计算时替换缺失值,默认为None,即缺失值会返回NaN。
116-2-4、axis(可选,默认值为0):当other是DataFrame时,此参数指定沿哪个轴进行操作;对于Series,通常不需要使用此参数,默认值为0。
116-3、功能
用于执行元素级除法的函数,它可以将当前Series的每个元素除以另一个Series或标量值。
116-4、返回值
返回一个新的Series,其中包含除法运算的结果。如果参与运算的两个对象没有相同的索引,结果中缺失的索引会被填充为NaN(若未设置fill_value)。
116-5、说明
无
116-6、用法
116-6-1、数据准备
无
116-6-2、代码示例
# 116、pandas.Series.div方法
import pandas as pd
# 创建一个Series
s1 = pd.Series([10, 20, 30], index=['a', 'b', 'c'])
s2 = pd.Series([1, 2, 3], index=['a', 'b', 'd'])
# 使用div方法
result = s1.div(s2, fill_value=0)
print(result)
116-6-3、结果输出
# 116、pandas.Series.div方法
# a 10.0
# b 10.0
# c inf
# d 0.0
# dtype: float64
117、pandas.Series.truediv方法
117-1、语法
# 117、pandas.Series.truediv方法
pandas.Series.truediv(other, level=None, fill_value=None, axis=0)
Return Floating division of series and other, element-wise (binary operator truediv).Equivalent to series / other, but with support to substitute a fill_value for missing data in either one of the inputs.Parameters:
other
Series or scalar value
level
int or name
Broadcast across a level, matching Index values on the passed MultiIndex level.fill_value
None or float value, default None (NaN)
Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result of filling (at that location) will be missing.axis
{0 or ‘index’}
Unused. Parameter needed for compatibility with DataFrame.Returns:
Series
The result of the operation.
117-2、参数
117-2-1、other(必须):标量、Series或DataFrame,表示要进行除法运算的值,可以是标量、另一个Series或DataFrame,如果other是Series或DataFrame,则会根据索引进行对齐。
117-2-2、level(可选,默认值为None):一个整数或字符串,如果other是具有MultiIndex的Series或DataFrame,使用该参数可以指定索引的哪个层进行对齐,level可以是层的名称或位置(索引值)。
117-2-3、fill_value(可选,默认值为None):标量值,在对齐过程中,如果某个Series的某个索引值在另一个Series或DataFrame中不存在,可以通过此参数提供一个填充值,以在计算时替换缺失值,默认值为None,即缺失值会返回NaN。
117-2-4、axis(可选,默认值为0):当other是DataFrame时,此参数指定沿哪个轴进行操作;对于Series,通常不需要使用此参数,默认值为0(即沿索引方向)。
117-3、功能
用于执行元素级的真除法运算,它与Series.div()方法的主要区别在于truediv明确表示执行浮点除法(即除法结果是浮点数),而div方法默认会根据传入的数据类型自动选择整数除法或浮点除法。
117-4、返回值
返回一个新的Series,其中包含除法运算的结果,如果参与运算的两个对象没有相同的索引,结果中缺失的索引会被填充为NaN(若未设置fill_value)。
117-5、说明
无
117-6、用法
117-6-1、数据准备
无
117-6-2、代码示例
# 117、pandas.Series.truediv方法
import pandas as pd
# 创建两个Series
s1 = pd.Series([10, 20, 30], index=['a', 'b', 'c'])
s2 = pd.Series([1, 2, 3], index=['a', 'b', 'd'])
# 使用truediv方法进行真除法
result = s1.truediv(s2, fill_value=1)
print(result)
117-6-3、结果输出
# 117、pandas.Series.truediv方法
# a 10.000000
# b 10.000000
# c 30.000000
# d 0.333333
# dtype: float64
118、pandas.Series.floordiv方法
118-1、语法
# 118、pandas.Series.floordiv方法
pandas.Series.floordiv(other, level=None, fill_value=None, axis=0)
Return Integer division of series and other, element-wise (binary operator floordiv).Equivalent to series // other, but with support to substitute a fill_value for missing data in either one of the inputs.Parameters:
other
Series or scalar value
level
int or name
Broadcast across a level, matching Index values on the passed MultiIndex level.fill_value
None or float value, default None (NaN)
Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result of filling (at that location) will be missing.axis
{0 or ‘index’}
Unused. Parameter needed for compatibility with DataFrame.Returns:
Series
The result of the operation.
118-2、参数
118-2-1、other(必须):标量、Series或DataFrame,表示要进行地板除法运算的值,可以是标量、另一个 Series或DataFrame,如果other是Series或DataFrame,则会根据索引进行对齐。
118-2-2、level(可选,默认值为None):一个整数或字符串,如果other是具有MultiIndex的Series或DataFrame,使用该参数可以指定索引的哪个层进行对齐,level可以是层的名称或位置(索引值)。
118-2-3、fill_value(可选,默认值为None):标量值,在对齐过程中,如果某个Series的某个索引值在另一个Series或DataFrame中不存在,可以通过此参数提供一个填充值,以在计算时替换缺失值,默认值为None,即缺失值会返回NaN。
118-2-4、axis(可选,默认值为0):一个整数或字符串,当other是DataFrame时,此参数指定沿哪个轴进行操作;对于Series,通常不需要使用此参数,默认值为0(即沿索引方向)。
118-3、功能
用于执行元素级的地板除法运算,该运算的结果是向下取整的整数除法,即不管余数是多少,结果都会向下舍入到最接近的整数。
118-4、返回值
返回一个新的Series,其中包含地板除法运算的结果,对于不存在的索引值,结果中将填充为NaN(若未设置fill_value)。
118-5、说明
无
118-6、用法
118-6-1、数据准备
无
118-6-2、代码示例
# 118、pandas.Series.floordiv方法
import pandas as pd
# 创建两个Series
s1 = pd.Series([10, 20, 30], index=['a', 'b', 'c'])
s2 = pd.Series([3, 4, 7], index=['a', 'b', 'd'])
# 使用floordiv方法进行地板除法
result = s1.floordiv(s2, fill_value=1)
print(result)
118-6-3、结果输出
# 118、pandas.Series.floordiv方法
# a 3.0
# b 5.0
# c 30.0
# d 0.0
# dtype: float64
119、pandas.Series.mod方法
119-1、语法
# 119、pandas.Series.mod方法
pandas.Series.mod(other, level=None, fill_value=None, axis=0)
Return Modulo of series and other, element-wise (binary operator mod).Equivalent to series % other, but with support to substitute a fill_value for missing data in either one of the inputs.Parameters:
other
Series or scalar value
level
int or name
Broadcast across a level, matching Index values on the passed MultiIndex level.fill_value
None or float value, default None (NaN)
Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result of filling (at that location) will be missing.axis
{0 or ‘index’}
Unused. Parameter needed for compatibility with DataFrame.Returns:
Series
The result of the operation.
119-2、参数
119-2-1、other(必须):标量、Series或DataFrame,表示要进行模运算的值,可以是标量、另一个Series或DataFrame,如果other是Series或DataFrame,则会根据索引进行对齐。
119-2-2、level(可选,默认值为None):一个整数或字符串,如果other是具有MultiIndex的Series或DataFrame,使用该参数可以指定索引的哪个层进行对齐,level可以是层的名称或位置(索引值)。
119-2-3、fill_value(可选,默认值为None):标量值,在对齐过程中,如果某个Series的某个索引值在另一个Series或DataFrame中不存在,可以通过此参数提供一个填充值,以在计算时替换缺失值,默认值为None,即缺失值会返回NaN。
119-2-4、axis(可选,默认值为0):当other是DataFrame时,此参数指定沿哪个轴进行操作;对于Series,通常不需要使用此参数,默认值为0(即沿索引方向)。
119-3、功能
用于执行元素级的模运算(取余运算),该运算将每个元素除以给定的值,并返回余数。
119-4、返回值
返回一个新的Series,其中包含模运算的结果,对于不存在的索引值,结果中将填充为NaN(若未设置fill_value)。
119-5、说明
119-5-1、对齐:当other是另一个Series或DataFrame时,mod()会根据索引进行对齐,如果索引不匹配,可能会得到NaN(除非使用fill_value填充)。
119-5-2、数据类型:模运算的结果将具有与输入Series相同的数据类型。对于整数类型的Series,结果也是整数类型;对于浮点型,结果将是浮点型。
119-6、用法
119-6-1、数据准备
无
119-6-2、代码示例
# 119、pandas.Series.mod方法
import pandas as pd
# 创建两个Series
s1 = pd.Series([10, 20, 30], index=['a', 'b', 'c'])
s2 = pd.Series([3, 4, 7], index=['a', 'b', 'd'])
# 使用mod方法进行模运算
result = s1.mod(s2, fill_value=1)
print(result)
119-6-3、结果输出
# 119、pandas.Series.mod方法
# a 1.0
# b 0.0
# c 0.0
# d 1.0
# dtype: float64
120、pandas.Series.pow方法
120-1、语法
# 120、pandas.Series.pow方法
pandas.Series.pow(other, level=None, fill_value=None, axis=0)
Return Exponential power of series and other, element-wise (binary operator pow).Equivalent to series ** other, but with support to substitute a fill_value for missing data in either one of the inputs.Parameters:
other
Series or scalar value
level
int or name
Broadcast across a level, matching Index values on the passed MultiIndex level.fill_value
None or float value, default None (NaN)
Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result of filling (at that location) will be missing.axis
{0 or ‘index’}
Unused. Parameter needed for compatibility with DataFrame.Returns:
Series
The result of the operation.
120-2、参数
120-2-1、other(必须):标量、Series或DataFrame,表示幂运算的指数,可以是标量(单一的幂值),也可以是另一个Series或DataFrame,如果other是Series或DataFrame,则会根据索引进行对齐。
120-2-2、level(可选,默认值为None):一个整数或字符串,如果other是具有MultiIndex的Series或DataFrame,使用该参数可以指定索引的哪个层进行对齐,level可以是层的名称或位置(索引值)。
120-2-3、fill_value(可选,默认值为None):标量值,在对齐过程中,如果某个Series的某个索引值在另一个Series或DataFrame中不存在,可以通过此参数提供一个填充值,以在计算时替换缺失值,默认值为None,即缺失值会返回NaN。
120-2-4、axis(可选,默认值为0):当other是DataFrame时,此参数指定沿哪个轴进行操作;对于Series,通常不需要使用此参数,默认值为0(即沿索引方向)。
120-3、功能
用于对Series中的每个元素进行幂运算,它的功能是将Series的每个元素的值提高到指定的幂次。
120-4、返回值
返回一个新的Series,其中包含幂运算的结果,对于不存在的索引值,结果中将填充为NaN(若未设置fill_value)。
120-5、说明
120-5-1、对齐:当other是另一个Series或DataFrame时,pow()方法会根据索引进行对齐,如果索引不匹配,可能会得到NaN(除非使用fill_value填充)。
120-5-2、数据类型:幂运算的结果将具有与输入Series相同的数据类型,对于整数类型的Series,结果也是整数类型;对于浮点型,结果将是浮点型。
120-6、用法
120-6-1、数据准备
无
120-6-2、代码示例
# 120、pandas.Series.pow方法
import pandas as pd
# 创建两个Series
s1 = pd.Series([2, 3, 4], index=['a', 'b', 'c'])
s2 = pd.Series([1, 2, 3], index=['a', 'b', 'd'])
# 使用pow方法进行幂运算
result = s1.pow(s2, fill_value=0)
print(result)
120-6-3、结果输出
# 120、pandas.Series.pow方法
# a 2.0
# b 9.0
# c 1.0
# d 0.0
# dtype: float64
二、推荐阅读
1、Python筑基之旅
2、Python函数之旅
3、Python算法之旅
4、Python魔法之旅
5、博客个人主页
相关文章:
Python酷库之旅-第三方库Pandas(037)
目录 一、用法精讲 116、pandas.Series.div方法 116-1、语法 116-2、参数 116-3、功能 116-4、返回值 116-5、说明 116-6、用法 116-6-1、数据准备 116-6-2、代码示例 116-6-3、结果输出 117、pandas.Series.truediv方法 117-1、语法 117-2、参数 117-3、功能 …...
iOS 左滑返回事件的控制
0x00 视图结构 1-根视图 1.1-控制器A 1.1.1-控制器B 1.1.1.1-控制器C 0x01 控制 通过设置 self.navigationController.interactivePopGestureRecognizer.enabled 为 YES 或 NO 来控制当面界面,是否能左滑返回 在 控制器B 的生命周期方法内,设置属性 s…...
= null 和 is null;SQL中关于NULL处理的4个陷阱;三值逻辑
一、概述 1、NULL参与的所有的比较和算术运算符(>,,<,<>,<,>,,-,*,/) 结果为unknown; 2、unknown的逻辑运算(AND、OR、NOT)遵循三值运算的真值表; 3、如果运算结果直接返回用户,使用NULL来标识unknown 4、如…...
拖拽上传(预览图片)
需求 点击上传图片,或直接拖拽图片到红色方框里面也可上传图片,上传后预览图片 效果 实现 <!DOCTYPE html> <html lang"zh-cn"><head><meta charset"UTF-8"><meta name"viewport" content&…...
Oracle 12c新特性 In-Memory Column Store
Oracle 12c引入了一项重要的特性——In-Memory Column Store(简称IM或In-Memory),这一特性极大地提升了数据库在处理分析型查询时的性能。以下是关于Oracle 12c In-Memory特性的详细介绍: 一、基本概念 In-Memory Column Store&…...
【数据结构】二叉树———Lesson2
Hi~!这里是奋斗的小羊,很荣幸您能阅读我的文章,诚请评论指点,欢迎欢迎 ~~ 💥💥个人主页:奋斗的小羊 💥💥所属专栏:C语言 🚀本系列文章为个人学习…...
mongodb数据导出与导入
一、先去检查mongodump mongodump --version 如果报 mongodump version: built-without-version-string 或者其他的较老的版本,直接去下载最新的【传送门】 【以Ubuntu18.04为例】 安装工具 假设你下载的是 .tgz 文件(适用于 Linux 系统)&am…...
电路学习——经典运放电路之滞回比较器(施密特触发器)(2024.07.18)
参考链接1: 电子设计教程29:滞回比较器(施密特触发器) 参考链接2: 滞回比较器电路详细分析 参考链接3: 比较器精髓:施密特触发器,正反馈的妙用 参考链接4: 比较器反馈电阻选多大?理解滞后效应,轻…...
NVIDIA Container Toolkit 安装与配置帮助文档(Ubuntu,Docker)
NVIDIA Container Toolkit 安装与配置帮助文档(Ubuntu,Docker) 本文档详细介绍了在 Ubuntu Server 22.04 上使用 Docker 安装和配置 NVIDIA Container Toolkit 的过程。 概述 NVIDIA 容器工具包使用户能够构建和运行 GPU 加速容器。即可以在容器中使用NVIDIA显卡。 架构图如…...
JavaWeb day01-HTML入门
Web前端 课程安排 HTML、CSS简介 HTML快速入门 实现标题排版 新闻标题样式...
驱动框架——CMSIS第一部分 RTE驱动框架介绍
一、介绍CMISIS 什么是CMSIS(cortex microcontrol software interface standard一种软件标准接口),官网地址:https://arm-software.github.io/CMSIS_6/latest/General/index.html 包含的core、driver、RTOS、dsp、nn等部分&…...
Debezium日常分享系列之:Debezium2.7版本PostgreSQL数据库连接器
Debezium日常分享系列之:Debezium2.7版本PostgreSQL数据库连接器 一、概述二、连接器的工作原理安全快照初始快照的默认工作流程行为临时快照触发临时增量快照触发临时阻塞快照增量快照增量快照流程Debezium 如何解决具有相同主键的记录之间的冲突快照窗口触发增量快照具有附加…...
保障信息系统安全保护等级调整期间的安全性
保障信息系统安全保护等级调整期间的安全性: 策略与实践 在当今数字化时代,信息系统已成为企业和组织运营的核心支撑。为了适应不断变化的业务需求和安全威胁环境,信息系统安全保护等级的调整成为必要之举。然而,这一调整过程可能…...
实战:shell编程之全量命令练习
概叙 槽点~~~~~~~! 往期shell相关文章回顾,有兴趣的可以自行阅读和练习。 科普文:一文搞懂Vim-CSDN博客 科普文:jvm笔记-CSDN博客 科普文:一天学会shell编程-CSDN博客 科普文:Linux服务器巡检小结_lin…...
在 CentOS 7 上编译安装 Python 3.11
安装必要的依赖 首先,你需要安装一些开发工具和库,以便编译 Python 和 OpenSSL: yum -y groupinstall "Development tools" yum install -y wget gcc-c pcre pcre-devel zlib zlib-devel libffi-devel zlib1g-dev openssl-devel …...
Qt 4.8.7 + MSVC 中文乱码问题深入分析
此问题很常见,然而网上关于此问题的分析大多不够深刻,甚至有错误;加之Qt5又更改了一些编码策略,而很多文章并未提及版本问题,或是就算提了,读者也不重视。这些因素很容易让读者产生误导。今日我彻底研究透了…...
IDEA的常见代码模板的使用
《IDEA破解、配置、使用技巧与实战教程》系列文章目录 第一章 IDEA破解与HelloWorld的实战编写 第二章 IDEA的详细设置 第三章 IDEA的工程与模块管理 第四章 IDEA的常见代码模板的使用 第五章 IDEA中常用的快捷键 第六章 IDEA的断点调试(Debug) 第七章 …...
arcgis怎么选取某个指定区域地方的数据,比如从全国乡镇数据选取长沙市乡镇数据
一共5个步骤,没一句废话,耐心看完。看完你就会在任何软件选取指定范围的数据了。 一、如图,先将数据加载到arcgis里面,我们要选取里面长沙市的范围数据。 二、选取长沙市的语句 “市” like ‘长沙%’ 切记,切记&…...
二、链表(1)
203.移除链表元素 创建一个虚拟哨兵头节点,就不用考虑原本头结点要不要删除 # Definition for singly-linked list. # class ListNode: # def __init__(self, val0, nextNone): # self.val val # self.next next class Solution:def remove…...
KAFKA搭建教程
KAFKA搭建教程 期待您的关注 KAFKA学习笔记 帮助更多人 目录 KAFKA搭建教程 1.下载Kafka并解压 2.添加环境变量 3.修改 server.properties 文件 4.将kafka复制到其它节点 5.修改node1、node2节点的broker.id 6.将master的环境变量同步到node1、 node2 7.启动zookeeper…...
调用支付宝接口响应40004 SYSTEM_ERROR问题排查
在对接支付宝API的时候,遇到了一些问题,记录一下排查过程。 Body:{"datadigital_fincloud_generalsaas_face_certify_initialize_response":{"msg":"Business Failed","code":"40004","sub_msg…...
【WiFi帧结构】
文章目录 帧结构MAC头部管理帧 帧结构 Wi-Fi的帧分为三部分组成:MAC头部frame bodyFCS,其中MAC是固定格式的,frame body是可变长度。 MAC头部有frame control,duration,address1,address2,addre…...
深入浅出:JavaScript 中的 `window.crypto.getRandomValues()` 方法
深入浅出:JavaScript 中的 window.crypto.getRandomValues() 方法 在现代 Web 开发中,随机数的生成看似简单,却隐藏着许多玄机。无论是生成密码、加密密钥,还是创建安全令牌,随机数的质量直接关系到系统的安全性。Jav…...
LeetCode - 394. 字符串解码
题目 394. 字符串解码 - 力扣(LeetCode) 思路 使用两个栈:一个存储重复次数,一个存储字符串 遍历输入字符串: 数字处理:遇到数字时,累积计算重复次数左括号处理:保存当前状态&a…...
SpringBoot+uniapp 的 Champion 俱乐部微信小程序设计与实现,论文初版实现
摘要 本论文旨在设计并实现基于 SpringBoot 和 uniapp 的 Champion 俱乐部微信小程序,以满足俱乐部线上活动推广、会员管理、社交互动等需求。通过 SpringBoot 搭建后端服务,提供稳定高效的数据处理与业务逻辑支持;利用 uniapp 实现跨平台前…...
OpenPrompt 和直接对提示词的嵌入向量进行训练有什么区别
OpenPrompt 和直接对提示词的嵌入向量进行训练有什么区别 直接训练提示词嵌入向量的核心区别 您提到的代码: prompt_embedding = initial_embedding.clone().requires_grad_(True) optimizer = torch.optim.Adam([prompt_embedding...
【HTTP三个基础问题】
面试官您好!HTTP是超文本传输协议,是互联网上客户端和服务器之间传输超文本数据(比如文字、图片、音频、视频等)的核心协议,当前互联网应用最广泛的版本是HTTP1.1,它基于经典的C/S模型,也就是客…...
MySQL用户和授权
开放MySQL白名单 可以通过iptables-save命令确认对应客户端ip是否可以访问MySQL服务: test: # iptables-save | grep 3306 -A mp_srv_whitelist -s 172.16.14.102/32 -p tcp -m tcp --dport 3306 -j ACCEPT -A mp_srv_whitelist -s 172.16.4.16/32 -p tcp -m tcp -…...
RSS 2025|从说明书学习复杂机器人操作任务:NUS邵林团队提出全新机器人装配技能学习框架Manual2Skill
视觉语言模型(Vision-Language Models, VLMs),为真实环境中的机器人操作任务提供了极具潜力的解决方案。 尽管 VLMs 取得了显著进展,机器人仍难以胜任复杂的长时程任务(如家具装配),主要受限于人…...
【JavaSE】多线程基础学习笔记
多线程基础 -线程相关概念 程序(Program) 是为完成特定任务、用某种语言编写的一组指令的集合简单的说:就是我们写的代码 进程 进程是指运行中的程序,比如我们使用QQ,就启动了一个进程,操作系统就会为该进程分配内存…...
