Python酷库之旅-第三方库Pandas(016)

news2024/9/8 22:59:59

目录

一、用法精讲

39、pandas.DataFrame.to_stata函数

39-1、语法

39-2、参数

39-3、功能

39-4、返回值

39-5、说明

39-6、用法

39-6-1、数据准备

39-6-2、代码示例

39-6-3、结果输出

40、pandas.read_stata函数

40-1、语法

40-2、参数

40-3、功能

40-4、返回值

40-5、说明

40-6、用法

40-6-1、数据准备

40-6-2、代码示例

40-6-3、结果输出 

二、推荐阅读

1、Python筑基之旅

2、Python函数之旅

3、Python算法之旅

4、Python魔法之旅

5、博客个人主页

一、用法精讲

39、pandas.DataFrame.to_stata函数
39-1、语法
# 39、pandas.DataFrame.to_stata函数
DataFrame.to_stata(path, *, convert_dates=None, write_index=True, byteorder=None, time_stamp=None, data_label=None, variable_labels=None, version=114, convert_strl=None, compression='infer', storage_options=None, value_labels=None)
Export DataFrame object to Stata dta format.

Writes the DataFrame to a Stata dataset file. “dta” files contain a Stata dataset.

Parameters:
pathstr, path object, or buffer
String, path object (implementing os.PathLike[str]), or file-like object implementing a binary write() function.

convert_datesdict
Dictionary mapping columns containing datetime types to stata internal format to use when writing the dates. Options are ‘tc’, ‘td’, ‘tm’, ‘tw’, ‘th’, ‘tq’, ‘ty’. Column can be either an integer or a name. Datetime columns that do not have a conversion type specified will be converted to ‘tc’. Raises NotImplementedError if a datetime column has timezone information.

write_indexbool
Write the index to Stata dataset.

byteorderstr
Can be “>”, “<”, “little”, or “big”. default is sys.byteorder.

time_stampdatetime
A datetime to use as file creation date. Default is the current time.

data_labelstr, optional
A label for the data set. Must be 80 characters or smaller.

variable_labelsdict
Dictionary containing columns as keys and variable labels as values. Each label must be 80 characters or smaller.

version{114, 117, 118, 119, None}, default 114
Version to use in the output dta file. Set to None to let pandas decide between 118 or 119 formats depending on the number of columns in the frame. Version 114 can be read by Stata 10 and later. Version 117 can be read by Stata 13 or later. Version 118 is supported in Stata 14 and later. Version 119 is supported in Stata 15 and later. Version 114 limits string variables to 244 characters or fewer while versions 117 and later allow strings with lengths up to 2,000,000 characters. Versions 118 and 119 support Unicode characters, and version 119 supports more than 32,767 variables.

Version 119 should usually only be used when the number of variables exceeds the capacity of dta format 118. Exporting smaller datasets in format 119 may have unintended consequences, and, as of November 2020, Stata SE cannot read version 119 files.

convert_strllist, optional
List of column names to convert to string columns to Stata StrL format. Only available if version is 117. Storing strings in the StrL format can produce smaller dta files if strings have more than 8 characters and values are repeated.

compressionstr or dict, default ‘infer’
For on-the-fly compression of the output data. If ‘infer’ and ‘path’ is path-like, then detect compression from the following extensions: ‘.gz’, ‘.bz2’, ‘.zip’, ‘.xz’, ‘.zst’, ‘.tar’, ‘.tar.gz’, ‘.tar.xz’ or ‘.tar.bz2’ (otherwise no compression). Set to None for no compression. Can also be a dict with key 'method' set to one of {'zip', 'gzip', 'bz2', 'zstd', 'xz', 'tar'} and other key-value pairs are forwarded to zipfile.ZipFile, gzip.GzipFile, bz2.BZ2File, zstandard.ZstdCompressor, lzma.LZMAFile or tarfile.TarFile, respectively. As an example, the following could be passed for faster compression and to create a reproducible gzip archive: compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1}.

New in version 1.5.0: Added support for .tar files.

Changed in version 1.4.0: Zstandard support.

storage_optionsdict, optional
Extra options that make sense for a particular storage connection, e.g. host, port, username, password, etc. For HTTP(S) URLs the key-value pairs are forwarded to urllib.request.Request as header options. For other URLs (e.g. starting with “s3://”, and “gcs://”) the key-value pairs are forwarded to fsspec.open. Please see fsspec and urllib for more details, and for more examples on storage options refer here.

value_labelsdict of dicts
Dictionary containing columns as keys and dictionaries of column value to labels as values. Labels for a single variable must be 32,000 characters or smaller.

New in version 1.4.0.

Raises:
NotImplementedError
If datetimes contain timezone information

Column dtype is not representable in Stata

ValueError
Columns listed in convert_dates are neither datetime64[ns] or datetime.datetime

Column listed in convert_dates is not in DataFrame

Categorical label contains more than 32,000 characters
39-2、参数

39-2-1、path(必须)要写入的文件的路径(包括文件名)。

39-2-2、convert_dates(可选,默认值为None)字典,指定哪些列应该被转换为Stata的日期或日期时间格式,键是列名,值是日期时间格式(如'tc'表示Stata中的日期时间,'td'表示日期)。如果列名不是DataFrame中的列,则会被忽略。

39-2-3、write_index(可选,默认值为True)是否将DataFrame的索引作为一列写入Stata文件。如果为False,则不写入索引。

39-2-4、byteorder(可选,默认值为None)字节顺序,用于写入文件。通常为None,允许pandas自行决定(通常是< 表示小端序),但在某些特殊情况下,如果Stata文件需要在特定系统或版本上读取,可能需要手动设置。

39-2-5、time_stamp(可选,默认值为None)写入文件的时间戳,这不会改变文件内容,但会在Stata中作为数据集的创建或修改时间显示。

39-2-6、data_label(可选,默认值为None)数据集标签,一个简短的描述性文本字符串,用于在Stata中标识数据集。

39-2-7、variable_labels(可选,默认值为None)字典,指定DataFrame中各列的变量标签,键是列名,值是描述性文本字符串。

39-2-8、version(可选,默认值为114)Stata文件的版本,对应于Stata 14及更高版本,不同版本的Stata支持不同的数据类型和特性。

39-2-9、convert_strl(可选,默认值为None)Stata 14引入了strl类型,用于存储长度可变的字符串,这个参数允许你指定哪些列应该被转换为strl类型(如果version参数允许)。默认情况下pandas会根据列中的最大字符串长度自动决定是否使用strl类型。

39-2-10、compression(可选,默认值为'infer')压缩方法。'infer' 会根据 path 的文件扩展名自动选择压缩方法(如果文件扩展名为.zip或.xz),'zip'和'xz'分别指定ZIP和XZ压缩。如果为None,则不进行压缩。

39-2-11、storage_options(可选,默认值为None)用于任何存储连接的额外选项,例如存储账户凭证,这通常用于云存储系统(如S3、GCS、HDFS等),对于本地文件系统或标准的文件I/O操作,此参数通常不使用。

39-2-12、value_labels(可选,默认值为None)字典,用于为DataFrame中的分类变量指定值标签。键是列名,值是一个从类别值到标签的映射字典,这对于在Stata中创建易于理解的分类变量非常有用。

39-3、功能

        用于将pandas DataFrame保存到Stata的.dta格式文件中。

39-4、返回值

        本身并不返回任何值(即返回值为None),它的主要作用是将DataFrame的内容写入到指定的 .dta文件中,而不是在Python环境中返回一个对象或值。

39-5、说明

        Stata是一种广泛使用的统计软件,.dta文件是Stata的专有数据格式,用于存储数据集。通过这个函数,用户可以将pandas DataFrame中的数据保存为Stata可以直接读取和处理的文件格式。

39-6、用法
39-6-1、数据准备
39-6-2、代码示例
# 39、pandas.DataFrame.to_stata函数
import pandas as pd
# 创建一个示例DataFrame
data = {
    'name': ['John', 'Anna', 'Peter', 'Linda'],
    'age': [28, 34, 29, 32],
    'date_of_birth': pd.to_datetime(['1992-01-01', '1988-02-15', '1991-07-23', '1989-10-10']),
    'city': ['New York', 'Paris', 'Berlin', 'London']
}
df = pd.DataFrame(data)
# 设置变量标签
variable_labels = {
    'name': 'Person Name',
    'age': 'Age in Years',
    'date_of_birth': 'Date of Birth',
    'city': 'City of Residence'
}
# 设置数据标签
data_label = 'Demo Dataset for Pandas to Stata Conversion'
# 将 DataFrame 保存到 Stata 文件
# 这里我们使用了 Stata 114 格式(即 Stata 14 及以上版本),它支持字符串变量长度超过 244 字符
# 我们还指定了转换日期,写入索引,并添加了变量和数据标签
df.to_stata('example.dta',
            convert_dates={'date_of_birth': 'td'},  # 将 'date_of_birth' 转换为 Stata 日期格式
            write_index=False,  # 不写入索引到 Stata 文件
            variable_labels=variable_labels,  # 添加变量标签
            data_label=data_label,  # 添加数据标签
            version=114)  # 指定 Stata 文件的版本
print("DataFrame has been successfully saved to Stata file.")
39-6-3、结果输出
# DataFrame has been successfully saved to Stata file.
40、pandas.read_stata函数
40-1、语法
# 40、pandas.read_stata函数
pandas.read_stata(filepath_or_buffer, *, convert_dates=True, convert_categoricals=True, index_col=None, convert_missing=False, preserve_dtypes=True, columns=None, order_categoricals=True, chunksize=None, iterator=False, compression='infer', storage_options=None)
Read Stata file into DataFrame.

Parameters:
filepath_or_bufferstr, path object or file-like object
Any valid string path is acceptable. The string could be a URL. Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is expected. A local file could be: file://localhost/path/to/table.dta.

If you want to pass in a path object, pandas accepts any os.PathLike.

By file-like object, we refer to objects with a read() method, such as a file handle (e.g. via builtin open function) or StringIO.

convert_datesbool, default True
Convert date variables to DataFrame time values.

convert_categoricalsbool, default True
Read value labels and convert columns to Categorical/Factor variables.

index_colstr, optional
Column to set as index.

convert_missingbool, default False
Flag indicating whether to convert missing values to their Stata representations. If False, missing values are replaced with nan. If True, columns containing missing values are returned with object data types and missing values are represented by StataMissingValue objects.

preserve_dtypesbool, default True
Preserve Stata datatypes. If False, numeric data are upcast to pandas default types for foreign data (float64 or int64).

columnslist or None
Columns to retain. Columns will be returned in the given order. None returns all columns.

order_categoricalsbool, default True
Flag indicating whether converted categorical data are ordered.

chunksizeint, default None
Return StataReader object for iterations, returns chunks with given number of lines.

iteratorbool, default False
Return StataReader object.

compressionstr or dict, default ‘infer’
For on-the-fly decompression of on-disk data. If ‘infer’ and ‘filepath_or_buffer’ is path-like, then detect compression from the following extensions: ‘.gz’, ‘.bz2’, ‘.zip’, ‘.xz’, ‘.zst’, ‘.tar’, ‘.tar.gz’, ‘.tar.xz’ or ‘.tar.bz2’ (otherwise no compression). If using ‘zip’ or ‘tar’, the ZIP file must contain only one data file to be read in. Set to None for no decompression. Can also be a dict with key 'method' set to one of {'zip', 'gzip', 'bz2', 'zstd', 'xz', 'tar'} and other key-value pairs are forwarded to zipfile.ZipFile, gzip.GzipFile, bz2.BZ2File, zstandard.ZstdDecompressor, lzma.LZMAFile or tarfile.TarFile, respectively. As an example, the following could be passed for Zstandard decompression using a custom compression dictionary: compression={'method': 'zstd', 'dict_data': my_compression_dict}.

New in version 1.5.0: Added support for .tar files.

storage_optionsdict, optional
Extra options that make sense for a particular storage connection, e.g. host, port, username, password, etc. For HTTP(S) URLs the key-value pairs are forwarded to urllib.request.Request as header options. For other URLs (e.g. starting with “s3://”, and “gcs://”) the key-value pairs are forwarded to fsspec.open. Please see fsspec and urllib for more details, and for more examples on storage options refer here.

Returns:
DataFrame or pandas.api.typing.StataReader.
40-2、参数

40-2-1、filepath_or_buffer(必须)字符串、路径对象或任何对象实现read()方法(如文件句柄或StringIO),这是要读取的.dta文件的路径或文件对象。

40-2-2、convert_dates(可选,默认值为True)布尔值,如果为True,则尝试将列转换为日期类型,如果数据中包含Stata日期时间,这非常有用。

40-2-3、convert_categoricals(可选,默认值为True)布尔值,如果为True,则尝试将列中的Stata值标签(value labels)转换为pandas的类别数据类型(Categorical dtype)。

40-2-4、index_col(可选,默认值为None)字符串或字符串列表,用作DataFrame行索引的列名或列名列表,如果传递了多个列名,将生成一个MultiIndex。

40-2-5、convert_missing(可选,默认值为False)布尔值,如果为True,则Stata 缺失值(如 .)将被转换为pandas的NaN值。然而,请注意,pandas通常已经能够正确处理这些缺失值,除非你有特定的理由需要更改此行为。

40-2-6、preserve_dtypes(可选,默认值为True)布尔值,如果为False,则在读取数据时不会尝试保留Stata 数据类型(如Stata 的字符串类型将被转换为pandas的object类型)。在某些情况下,这可以提高读取速度,但可能会丢失数据类型信息。

40-2-7、columns(可选,默认值为None)字符串列表,返回DataFrame中要包含的列名列表,如果为None,则读取所有列。

40-2-8、order_categoricals(可选,默认值为True)布尔值,如果为True,则对读取的类别数据类型(Categorical dtype)的类别进行排序,这基于Stata文件中定义的类别顺序。

40-2-9、chunksize(可选,默认值为None)整数,如果指定了非零值,则返回一个迭代器,该迭代器以chunksize行数为块提供DataFrame,这对于处理大型文件时节省内存非常有用。

40-2-10、iterator(可选,默认值为False)布尔值,如果为True,则返回TextFileReader对象,该对象可以迭代以分块读取文件,这与chunksize参数结合使用时特别有用。

40-2-11、compression(可选,默认值为'infer')字符串或None,用于指定文件压缩类型的字符串,如'gzip'、'bz2'、'zip'、'xz'或'infer'(如果filepath_or_buffer是字符串,则自动检测压缩),如果为None,则不进行解压缩。

40-2-12、storage_options(可选,默认值为None)字典,对于存储在如Google Cloud Storage、Amazon S3等云存储服务中的文件,此参数允许传递额外的选项来访问这些文件。

40-3、功能

        将Stata的.dta格式文件读取到pandas DataFrame中。

40-4、返回值

        返回值是一个pandas DataFrame对象,该对象包含了从.dta文件中读取的数据。

40-5、说明

        无

40-6、用法
40-6-1、数据准备
# 使用pandas.DataFrame.to_stata函数创建.dta文件
import pandas as pd
# 创建一个示例DataFrame
data = {
    'name': ['John', 'Anna', 'Peter', 'Linda'],
    'age': [28, 34, 29, 32],
    'date_of_birth': pd.to_datetime(['1992-01-01', '1988-02-15', '1991-07-23', '1989-10-10']),
    'city': ['New York', 'Paris', 'Berlin', 'London']
}
df = pd.DataFrame(data)
# 设置变量标签
variable_labels = {
    'name': 'Person Name',
    'age': 'Age in Years',
    'date_of_birth': 'Date of Birth',
    'city': 'City of Residence'
}
# 设置数据标签
data_label = 'Demo Dataset for Pandas to Stata Conversion'
# 将 DataFrame 保存到 Stata 文件
# 这里我们使用了 Stata 114 格式(即 Stata 14 及以上版本),它支持字符串变量长度超过 244 字符
# 我们还指定了转换日期,写入索引,并添加了变量和数据标签
df.to_stata('example.dta',
            convert_dates={'date_of_birth': 'td'},  # 将 'date_of_birth' 转换为 Stata 日期格式
            write_index=False,  # 不写入索引到 Stata 文件
            variable_labels=variable_labels,  # 添加变量标签
            data_label=data_label,  # 添加数据标签
            version=114)  # 指定 Stata 文件的版本
print("DataFrame has been successfully saved to Stata file.")
40-6-2、代码示例
# 40、pandas.read_stata函数
import pandas as pd
# 指定.dta文件的路径
file_path = 'example.dta'
# 使用pandas的read_stata函数读取文件
df = pd.read_stata(file_path)
# 显示DataFrame的前几行以确认数据已正确读取
print(df.head())
40-6-3、结果输出 
# 40、pandas.read_stata函数
#     name  age date_of_birth      city
# 0   John   28    1992-01-01  New York
# 1   Anna   34    1988-02-15     Paris
# 2  Peter   29    1991-07-23    Berlin
# 3  Linda   32    1989-10-10    London

二、推荐阅读

1、Python筑基之旅
2、Python函数之旅
3、Python算法之旅
4、Python魔法之旅
5、博客个人主页

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1916930.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Gmail邮件提醒通知如何设置?有哪些方法?

Gmail邮件提醒通知功能怎么样&#xff1f;通知邮件怎么有效发送&#xff1f; Gmail作为全球广泛使用的电子邮件服务&#xff0c;提供了多种邮件提醒通知功能&#xff0c;帮助用户不错过重要信息。AokSend将详细介绍如何设置Gmail邮件提醒通知&#xff0c;确保您不会错过任何重…

Mysql查询近半年每个月有多少天

Mysql 查询近6个月每个月有多少天&#xff1a; SELECT DATE_FORMAT(DATE_ADD(NOW(),INTERVAL-(CAST( help_topic_id AS SIGNED INTEGER )) MONTH ), %Y-%m) as months,DAY(LAST_DAY(CONCAT(DATE_FORMAT(DATE_ADD(NOW(),INTERVAL-(CAST( help_topic_id AS SIGNED INTEGER )) MO…

JavaScript中的Symbol类型是什么以及它的作用

聚沙成塔每天进步一点点 本文回顾 ⭐ 专栏简介JavaScript中的Symbol类型是什么以及它的作用1. 符号&#xff08;Symbol&#xff09;的创建2. 符号的特性3. 符号的作用3.1 属性名的唯一性3.2 防止属性被意外访问或修改3.3 使用内置的符号3.4 符号与属性遍历 4. 总结 ⭐ 写在最后…

光学传感器图像处理流程(二)

光学传感器图像处理流程&#xff08;二&#xff09; 2.4. 图像增强2.4.1. 彩色合成2.4.2 直方图变换2.4.3. 密度分割2.4.4. 图像间运算2.4.5. 邻域增强2.4.6. 主成分分析2.4.7. 图像融合 2.5. 裁剪与镶嵌2.5.1. 图像裁剪2.5.2. 图像镶嵌 2.6. 遥感信息提取2.6.1. 目视解译2.6.2…

AI网络爬虫022:批量下载某个网页中的全部链接

文章目录 一、介绍二、输入内容三、输出内容一、介绍 网页如下,有多个链接: 找到其中的a标签: <a hotrep="doc.overview.modules.path.0.0.1" href="https://cloud.tencent.com/document/product/1093/35681" title="产品优势">产品优…

02-图像基础-参数

在做有关图像和视频类的实际项目时&#xff0c;常常会涉及到图像的一些配置&#xff0c;下面对这些参数进行解释。 我们在电脑打开一张照片&#xff0c;可以看到一张完整的图像&#xff0c;比如一张360P的图片&#xff0c;其对应的像素点就是640*360&#xff0c;可以以左上角为…

Java---数组

乐观学习&#xff0c;乐观生活&#xff0c;才能不断前进啊&#xff01;&#xff01;&#xff01; 我的主页&#xff1a;optimistic_chen 我的专栏&#xff1a;c语言 欢迎大家访问~ 创作不易&#xff0c;大佬们点赞鼓励下吧~ 前言 无论c语言还是java数组都是重中之重&#xff0…

nasa数据集——1 度网格单元的全球月度土壤湿度统计数据

AMSR-E/Aqua level 3 global monthly Surface Soil Moisture Averages V005 (AMSRE_AVRMO) at GES DISC GES DISC 的 AMSR-E/Aqua 第 3 级全球地表土壤水分月平均值 V005 (AMSRE_AVRMO) AMSR-E/Aqua level 3 global monthly Surface Soil Moisture Standard Deviation V005 (…

基于JavaSpringBoot+Vue+uniapp微信小程序校园宿舍管理系统设计与实现(7000字论文参考+源码+LW+部署讲解)

博主介绍&#xff1a;硕士研究生&#xff0c;专注于信息化技术领域开发与管理&#xff0c;会使用java、标准c/c等开发语言&#xff0c;以及毕业项目实战✌ 从事基于java BS架构、CS架构、c/c 编程工作近16年&#xff0c;拥有近12年的管理工作经验&#xff0c;拥有较丰富的技术架…

不坑盒子是干啥的?

不坑盒子是一款专为提升办公效率设计的插件&#xff0c;它兼容Microsoft Office和WPS Office&#xff0c;支持Word、Excel、PPT等常用办公软件。这款插件自2024年初开始受到关注&#xff0c;其主要目的是为了让用户在日常办公中能够更加便捷地完成任务&#xff0c;从而提高工作…

昇思25天学习打卡营第23天 | Pix2Pix实现图像转换

内容介绍&#xff1a; Pix2Pix是基于条件生成对抗网络&#xff08;cGAN, Condition Generative Adversarial Networks &#xff09;实现的一种深度学习图像转换模型&#xff0c;该模型是由Phillip Isola等作者在2017年CVPR上提出的&#xff0c;可以实现语义/标签到真实图片、灰…

二分法求函数的零点 信友队

题目ID&#xff1a;15713 必做题 100分 时间限制: 1000ms 空间限制: 65536kB 题目描述 有函数&#xff1a;f(x) 已知f(1.5) > 0&#xff0c;f(2.4) < 0 且方程 f(x) 0 在区间 [1.5,2.4] 有且只有一个根&#xff0c;请用二分法求出该根。 输入格式 &#xff08;无…

reduce规约:深入理解java8中的规约reduce

&#x1f370; 个人主页:_小白不加班__ &#x1f35e;文章有不合理的地方请各位大佬指正。 &#x1f349;文章不定期持续更新&#xff0c;如果我的文章对你有帮助➡️ 关注&#x1f64f;&#x1f3fb; 点赞&#x1f44d; 收藏⭐️ 文章目录 常见场景图示reduce中的BiFunction和…

【linux】阿里云centos配置邮件服务

目录 1.安装mailx服务 2./etc/mail.rc 配置增加 3.QQ邮箱开启smtp服务&#xff0c;获取授权码 4.端口设置&#xff1a;Linux 防火墙开放端口-CSDN博客 5.测试 1.安装mailx服务 yum -y install mailx 2./etc/mail.rc 配置增加 #邮件发送人 set from924066173qq.com #阿里…

完美解决AttributeError: ‘list‘ object has no attribute ‘shape‘的正确解决方法,亲测有效!!!

完美解决AttributeError: ‘list‘ object has no attribute ‘shape‘的正确解决方法&#xff0c;亲测有效&#xff01;&#xff01;&#xff01; 亲测有效 完美解决AttributeError: ‘list‘ object has no attribute ‘shape‘的正确解决方法&#xff0c;亲测有效&#xff0…

Java对象引用的访问方式是什么?

哈喽&#xff0c;大家好&#x1f389;&#xff0c;我是世杰。 本文我为大家介绍面试官经常考察的**「Java对象引用相关内容」** 照例在开头留一些面试考察内容~~ 面试连环call Java对象引用都有哪些类型?Java参数传递是值传递还是引用传递? 为什么?Java对象引用访问方式有…

解释 C 语言中的递归函数

&#x1f345;关注博主&#x1f397;️ 带你畅游技术世界&#xff0c;不错过每一次成长机会&#xff01; &#x1f4d9;C 语言百万年薪修炼课程 通俗易懂&#xff0c;深入浅出&#xff0c;匠心打磨&#xff0c;死磕细节&#xff0c;6年迭代&#xff0c;看过的人都说好。 文章目…

各向异性含水层中地下水三维流基本微分方程的推导

各向异性含水层中地下水三维流基本微分方程的推导 参考文献&#xff1a; [1] 刘欣怡,付小莉.论连续性方程的推导及几种形式转换的方法[J].力学与实践,2023,45(02):469-474. 文章链接 水均衡的基本思想&#xff1a; ∑ 流 入 − ∑ 流 出 Δ V \sum 流入-\sum 流出\Delta V ∑…

【系统架构设计师】九、软件工程(软件测试)

目录 八、软件测试 8.1 测试分类 8.2 静态方法 8.2.1 静态测试 8.2.2 动态测试 8.2.3 自动化测试 8.3 测试阶段 8.3.1 单元测试 8.3.2 集成测试 8.3.3 确认测试 8.3.4 系统测试 8.3.5 性能测试 8.3.6 验收测试 8.3.7 其他测试 8.4 测试用例设计 8.4.1 黑…

使用 Python 绘制美国选举分级统计图

「AI秘籍」系列课程&#xff1a; 人工智能应用数学基础 人工智能Python基础 人工智能基础核心知识 人工智能BI核心知识 人工智能CV核心知识 如何创建美国选举结果的时间序列分级统计图 数据地址为源地址&#xff0c;如果失效请与我联系。 2024 年美国大选将至&#xff0c;…