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

news2024/9/23 9:25:52

目录

一、用法精讲

501、pandas.DataFrame.mode方法

501-1、语法

501-2、参数

501-3、功能

501-4、返回值

501-5、说明

501-6、用法

501-6-1、数据准备

501-6-2、代码示例

501-6-3、结果输出

502、pandas.DataFrame.pct_change方法

502-1、语法

502-2、参数

502-3、功能

502-4、返回值

502-5、说明

502-6、用法

502-6-1、数据准备

502-6-2、代码示例

502-6-3、结果输出

503、pandas.DataFrame.prod方法

503-1、语法

503-2、参数

503-3、功能

503-4、返回值

503-5、说明

503-6、用法

503-6-1、数据准备

503-6-2、代码示例

503-6-3、结果输出

504、pandas.DataFrame.product方法

504-1、语法

504-2、参数

504-3、功能

504-4、返回值

504-5、说明

504-6、用法

504-6-1、数据准备

504-6-2、代码示例

504-6-3、结果输出

505、pandas.DataFrame.quantile方法

505-1、语法

505-2、参数

505-3、功能

505-4、返回值

505-5、说明

505-6、用法

505-6-1、数据准备

505-6-2、代码示例

505-6-3、结果输出

二、推荐阅读

1、Python筑基之旅

2、Python函数之旅

3、Python算法之旅

4、Python魔法之旅

5、博客个人主页

一、用法精讲

501、pandas.DataFrame.mode方法
501-1、语法
# 501、pandas.DataFrame.mode方法
pandas.DataFrame.mode(axis=0, numeric_only=False, dropna=True)
Get the mode(s) of each element along the selected axis.

The mode of a set of values is the value that appears most often. It can be multiple values.

Parameters:
axis
{0 or ‘index’, 1 or ‘columns’}, default 0
The axis to iterate over while searching for the mode:

0 or ‘index’ : get mode of each column

1 or ‘columns’ : get mode of each row.

numeric_only
bool, default False
If True, only apply to numeric columns.

dropna
bool, default True
Don’t consider counts of NaN/NaT.

Returns:
DataFrame
The modes of each column or row.
501-2、参数

501-2-1、axis(可选,默认值为0){0或'index', 1或'columns'},0或'index',在行的方向上进行操作,计算每一列的众数;1或'columns',在列的方向上进行操作,计算每一行的众数。

501-2-2、numeric_only(可选,默认值为False)布尔值,如果为True,仅计算数值类型的列(或行)以寻找众数;如果为False,则所有类型的列(或行)都会被考虑。

501-2-3、dropna(可选,默认值为True)布尔值,是否在计算众数时忽略缺失值(NaN),如果为True,缺失值将被忽略;如果为False,则众数计算包括缺失值。

501-3、功能

        用于计算数据框中每一列或每一行的众数,即出现频率最高的值。

501-4、返回值

        返回一个DataFrame,其中每一列包含相应列(或行)的众数,如果有多个众数,返回的每个众数将占用不同的行。

501-5、说明

        无

501-6、用法
501-6-1、数据准备
501-6-2、代码示例
# 501、pandas.DataFrame.mode方法
import pandas as pd
# 创建一个示例数据框
data = {
    'A': [1, 2, 2, 3, 4],
    'B': [5, 5, 7, 7, 9],
    'C': [2, 4, None, 4, 10]
}
df = pd.DataFrame(data)
# 计算每列的众数
mode_values = df.mode(axis=0)
print("每列的众数:\n", mode_values)
# 计算每行的众数
mode_values_rows = df.mode(axis=1)
print("每行的众数:\n", mode_values_rows)
501-6-3、结果输出
# 501、pandas.DataFrame.mode方法
# 每列的众数:
#       A  B    C
# 0  2.0  5  4.0
# 1  NaN  7  NaN
# 每行的众数:
#       0    1     2
# 0  1.0  2.0   5.0
# 1  2.0  4.0   5.0
# 2  2.0  7.0   NaN
# 3  3.0  4.0   7.0
# 4  4.0  9.0  10.0
502、pandas.DataFrame.pct_change方法
502-1、语法
# 502、pandas.DataFrame.pct_change方法
pandas.DataFrame.pct_change(periods=1, fill_method=_NoDefault.no_default, limit=_NoDefault.no_default, freq=None, **kwargs)
Fractional change between the current and a prior element.

Computes the fractional change from the immediately previous row by default. This is useful in comparing the fraction of change in a time series of elements.

Note

Despite the name of this method, it calculates fractional change (also known as per unit change or relative change) and not percentage change. If you need the percentage change, multiply these values by 100.

Parameters:
periodsint, default 1
Periods to shift for forming percent change.

fill_method{‘backfill’, ‘bfill’, ‘pad’, ‘ffill’, None}, default ‘pad’
How to handle NAs before computing percent changes.

Deprecated since version 2.1: All options of fill_method are deprecated except fill_method=None.

limitint, default None
The number of consecutive NAs to fill before stopping.

Deprecated since version 2.1.

freqDateOffset, timedelta, or str, optional
Increment to use from time series API (e.g. ‘ME’ or BDay()).

**kwargs
Additional keyword arguments are passed into DataFrame.shift or Series.shift.

Returns:
Series or DataFrame
The same type as the calling object.
502-2、参数

502-2-1、periods(可选,默认值为1)整数,表示计算变化的周期数。默认为1,即计算当前行与前一行的百分比变化;如果设置为2,则计算当前行与前两行的百分比变化,以此类推。

502-2-2、fill_method(可选)字符串,在计算过程中如何填充缺失值的方法,可以是'pad'(用前一个值填充)或'bfill'(用后一个值填充),如果不需要填充,可以省略此参数。

502-2-3、limit(可选)整数,指定在填充缺失值时的限制,表示最多填充的数量。

502-2-4、freq(可选,默认值为None)字符串,当处理时间序列数据时,可以用来定义频率,对于非时间序列数据,此参数无效。

502-2-5、**kwargs(可选)其他关键字参数,具体取决于具体实现。

502-3、功能

        用于计算数据框中每个元素与前一个元素之间的百分比变化,该方法对于时间序列数据分析非常有用,能够帮助你识别相对变化的趋势。

502-4、返回值

        返回一个新的DataFrame,其中包含每个元素相对于给定周期的百分比变化,数据框的维度与原始数据框相同,但首行或相应周期的行会含有NaN值,因为没有前一个值可供计算。

502-5、说明

        无

502-6、用法
502-6-1、数据准备
502-6-2、代码示例
# 502、pandas.DataFrame.pct_change方法
import pandas as pd
# 创建一个示例数据框
data = {
    'A': [100, 120, 150, 130],
    'B': [200, 220, 210, 250]
}
df = pd.DataFrame(data)
# 计算默认的百分比变化
pct_change_default = df.pct_change()
print("默认百分比变化:\n", pct_change_default)
# 计算周期为2的百分比变化
pct_change_periods_2 = df.pct_change(periods=2)
print("周期为2的百分比变化:\n", pct_change_periods_2)
502-6-3、结果输出
# 502、pandas.DataFrame.pct_change方法
# 默认百分比变化:
#            A         B
# 0       NaN       NaN
# 1  0.200000  0.100000
# 2  0.250000 -0.045455
# 3 -0.133333  0.190476
# 周期为2的百分比变化:
#            A         B
# 0       NaN       NaN
# 1       NaN       NaN
# 2  0.500000  0.050000
# 3  0.083333  0.136364
503、pandas.DataFrame.prod方法
503-1、语法
# 503、pandas.DataFrame.prod方法
pandas.DataFrame.prod(axis=0, skipna=True, numeric_only=False, min_count=0, **kwargs)
Return the product of the values over the requested axis.

Parameters:
axis{index (0), columns (1)}
Axis for the function to be applied on. For Series this parameter is unused and defaults to 0.

Warning

The behavior of DataFrame.prod with axis=None is deprecated, in a future version this will reduce over both axes and return a scalar To retain the old behavior, pass axis=0 (or do not pass axis).

New in version 2.0.0.

skipnabool, default True
Exclude NA/null values when computing the result.

numeric_onlybool, default False
Include only float, int, boolean columns. Not implemented for Series.

min_countint, default 0
The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA.

**kwargs
Additional keyword arguments to be passed to the function.

Returns:
Series or scalar.
503-2、参数

503-2-1、axis(可选,默认值为0){0或 'index', 1或 'columns'},指定沿着哪个轴进行计算,0表示按列计算乘积,1表示按行计算乘积。

503-2-2、skipna(可选,默认值为True)布尔值,如果为True,则在计算乘积时会跳过缺失值(NaN);如果为False,缺失值将被视为0,从而使乘积结果为0。

503-2-3、numeric_only(可选,默认值为False)布尔值,如果为True,则只计算数值型列的乘积,非数值型列将被忽略。此参数在某些版本中可用,并可能在将来版本中更加严格。

503-2-4、min_count(可选,默认值为0)整数,指定计算乘积时所需的最小非缺失值数量,如果有效值数量少于min_count,则结果将为NaN。

503-2-5、**kwargs(可选)其他关键字参数,具体取决于具体实现。

503-3、功能

        用于计算数据框中元素的乘积,可以根据指定的轴进行操作,该方法在处理数值型数据时非常有用,特别是在需要计算总量或累积值的情况下。

503-4、返回值

        返回一个Series或标量值,表示所计算的乘积结果,如果沿着行计算,返回的Series将描述每列的乘积;如果沿着列计算,则返回标量值。

503-5、说明

        无

503-6、用法
503-6-1、数据准备
503-6-2、代码示例
# 503、pandas.DataFrame.prod方法
import pandas as pd
# 创建一个示例数据框
data = {
    'A': [1, 2, 3],
    'B': [4, 5, 6],
    'C': [7, None, 9]
}
df = pd.DataFrame(data)
# 计算按列的乘积
prod_columns = df.prod(axis=0)
print("按列计算的乘积:\n", prod_columns)
# 计算按行的乘积
prod_rows = df.prod(axis=1)
print("按行计算的乘积:\n", prod_rows)
# 跳过NaN值并计算乘积
prod_skipna = df.prod(skipna=True)
print("跳过NaN后的乘积:\n", prod_skipna)
# 设置min_count
prod_min_count = df.prod(min_count=2)
print("设置最小非缺失值计数后的乘积:\n", prod_min_count)
503-6-3、结果输出
# 503、pandas.DataFrame.prod方法
# 按列计算的乘积:
#  A      6.0
# B    120.0
# C     63.0
# dtype: float64
# 按行计算的乘积:
#  0     28.0
# 1     10.0
# 2    162.0
# dtype: float64
# 跳过NaN后的乘积:
#  A      6.0
# B    120.0
# C     63.0
# dtype: float64
# 设置最小非缺失值计数后的乘积:
#  A      6.0
# B    120.0
# C     63.0
# dtype: float64
504、pandas.DataFrame.product方法
504-1、语法
# 504、pandas.DataFrame.product方法
pandas.DataFrame.product(axis=0, skipna=True, numeric_only=False, min_count=0, **kwargs)
Return the product of the values over the requested axis.

Parameters:
axis{index (0), columns (1)}
Axis for the function to be applied on. For Series this parameter is unused and defaults to 0.

Warning

The behavior of DataFrame.prod with axis=None is deprecated, in a future version this will reduce over both axes and return a scalar To retain the old behavior, pass axis=0 (or do not pass axis).

New in version 2.0.0.

skipnabool, default True
Exclude NA/null values when computing the result.

numeric_onlybool, default False
Include only float, int, boolean columns. Not implemented for Series.

min_countint, default 0
The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA.

**kwargs
Additional keyword arguments to be passed to the function.

Returns:
Series or scalar.
504-2、参数

504-2-1、axis(可选,默认值为0){0或 'index', 1或 'columns'},指定沿着哪个轴进行乘积计算,0表示按行计算(每列的乘积),1表示按列计算(每行的乘积)。

504-2-2、skipna(可选,默认值为True)布尔值,是否在计算乘积时跳过缺失值(NaN),如果设置为True,缺失值将被忽略;如果为False,缺失值将会导致结果为NaN。

504-2-3、numeric_only(可选,默认值为False)布尔值,如果为True,仅计算数值类型的列;如果为False,所有列都会被考虑,但非数值列会对计算产生影响。

504-2-4、min_count(可选,默认值为0)整数,在计算乘积时,至少需要的非缺失值数量,如果有效值数量少于这个值,结果将为NaN。

504-2-5、**kwargs(可选)其他关键字参数,具体实现上可能会有不同的效果。

504-3、功能

        用于计算数据框中元素的乘积,可以按指定的轴进行操作。

504-4、返回值

        返回一个Series或标量值,表示乘积结果,如果按行计算,返回的Series会表示每列的乘积;若按列计算,则返回一个标量值。

504-5、说明

        无

504-6、用法
504-6-1、数据准备
504-6-2、代码示例
# 504、pandas.DataFrame.product方法
import pandas as pd
# 创建示例数据框
data = {
    'A': [1, 2, 3],
    'B': [4, 5, 6],
    'C': [7, None, 9]  # 包含一个 NaN 值
}
df = pd.DataFrame(data)
# 计算按列的乘积
prod_columns = df.product(axis=0)
print("按列计算的乘积:\n", prod_columns)
# 计算按行的乘积
prod_rows = df.product(axis=1)
print("按行计算的乘积:\n", prod_rows)
# 跳过NaN值并计算乘积
prod_skipna = df.product(skipna=True)
print("跳过 NaN 后的乘积:\n", prod_skipna)
# 设置min_count
prod_min_count = df.product(min_count=2)
print("设置最小非缺失值计数后的乘积:\n", prod_min_count)
# 计算数值类型的乘积
prod_numeric_only = df.product(numeric_only=True)
print("只计算数值类型的乘积:\n", prod_numeric_only)
504-6-3、结果输出
# 504、pandas.DataFrame.product方法
# 按列计算的乘积:
#  A      6.0
# B    120.0
# C     63.0
# dtype: float64
# 按行计算的乘积:
#  0     28.0
# 1     10.0
# 2    162.0
# dtype: float64
# 跳过 NaN 后的乘积:
#  A      6.0
# B    120.0
# C     63.0
# dtype: float64
# 设置最小非缺失值计数后的乘积:
#  A      6.0
# B    120.0
# C     63.0
# dtype: float64
# 只计算数值类型的乘积:
#  A      6.0
# B    120.0
# C     63.0
# dtype: float64
505、pandas.DataFrame.quantile方法
505-1、语法
# 505、pandas.DataFrame.quantile方法
pandas.DataFrame.quantile(q=0.5, axis=0, numeric_only=False, interpolation='linear', method='single')
Return values at the given quantile over requested axis.

Parameters:
qfloat or array-like, default 0.5 (50% quantile)
Value between 0 <= q <= 1, the quantile(s) to compute.

axis{0 or ‘index’, 1 or ‘columns’}, default 0
Equals 0 or ‘index’ for row-wise, 1 or ‘columns’ for column-wise.

numeric_onlybool, default False
Include only float, int or boolean data.

Changed in version 2.0.0: The default value of numeric_only is now False.

interpolation{‘linear’, ‘lower’, ‘higher’, ‘midpoint’, ‘nearest’}
This optional parameter specifies the interpolation method to use, when the desired quantile lies between two data points i and j:

linear: i + (j - i) * fraction, where fraction is the fractional part of the index surrounded by i and j.

lower: i.

higher: j.

nearest: i or j whichever is nearest.

midpoint: (i + j) / 2.

method{‘single’, ‘table’}, default ‘single’
Whether to compute quantiles per-column (‘single’) or over all columns (‘table’). When ‘table’, the only allowed interpolation methods are ‘nearest’, ‘lower’, and ‘higher’.

Returns:
Series or DataFrame
If
q
is an array, a DataFrame will be returned where the
index is q, the columns are the columns of self, and the values are the quantiles.

If
q
is a float, a Series will be returned where the
index is the columns of self and the values are the quantiles.
505-2、参数

505-2-1、q(可选,默认值为0.5)浮点数或类数组对象,要计算的分位数,范围在[0, 1]之间,可传入多个分位数(如[0.25,0.5,0.75])来获取相应的分位值,默认值为0.5(中位数)。

505-2-2、axis(可选,默认值为0){0或 'index', 1或 'columns'},指定计算的轴,0表示按列计算(计算每一列的分位数),1表示按行计算(计算每一行的分位数)。

505-2-3、numeric_only(可选,默认值为False)布尔值,如果为True,仅计算数值类型的列;如果为False,所有列都会被考虑,但非数值类型的列会为结果带来影响。

505-2-4、interpolation(可选,默认值为'linear'){‘linear’, ‘lower’, ‘higher’, ‘nearest’, ‘midpoint’, ‘slinear’, ‘spline’, ‘barycentric’},指定用于计算分位数的插值方法,当数据点不足以找到q分位数时,这将影响计算结果。

505-2-5、method(可选,默认值为'single'){‘single’, ‘pandas’},指定用于计算方法的选择,'single'表示直接取中位数或分位数,'pandas'会基于pandas的实现进行计算。

505-3、功能

        用于计算数据框中指定分位数的值。

505-4、返回值

        返回一个Series或标量值,表示指定分位数的结果,如果按行计算,返回的结果将会是一个Series,其中包含每一行的分位值。

505-5、说明

        无

505-6、用法
505-6-1、数据准备
505-6-2、代码示例
# 505、pandas.DataFrame.quantile方法
import pandas as pd
# 创建示例数据框
data = {
    'A': [1, 2, 3, 4, 5],
    'B': [5, 6, 7, 8, 9],
    'C': [10, 15, 20, 25, 30]
}
df = pd.DataFrame(data)
# 计算中位数
median = df.quantile(q=0.5)
print("中位数:\n", median)
# 计算第25和75百分位数
quantiles_25_75 = df.quantile(q=[0.25, 0.75])
print("第25和75百分位数:\n", quantiles_25_75)
# 按行计算分位数
row_quantile = df.quantile(q=0.5, axis=1)
print("按行计算中位数:\n", row_quantile)
# 只计算数值类型的分位数
numeric_quantile = df.quantile(numeric_only=True)
print("只计算数值类型的分位数:\n", numeric_quantile)
# 使用不同的插值方法计算分位数
interpolation_quantile = df.quantile(q=0.5, interpolation='midpoint')
print("使用中点插值法计算中位数:\n", interpolation_quantile)
505-6-3、结果输出
# 505、pandas.DataFrame.quantile方法
# 中位数:
#  A     3.0
# B     7.0
# C    20.0
# Name: 0.5, dtype: float64
# 第25和75百分位数:
#          A    B     C
# 0.25  2.0  6.0  15.0
# 0.75  4.0  8.0  25.0
# 按行计算中位数:
#  0    5.0
# 1    6.0
# 2    7.0
# 3    8.0
# 4    9.0
# Name: 0.5, dtype: float64
# 只计算数值类型的分位数:
#  A     3.0
# B     7.0
# C    20.0
# Name: 0.5, dtype: float64
# 使用中点插值法计算中位数:
#  A     3.0
# B     7.0
# C    20.0
# Name: 0.5, dtype: float64

二、推荐阅读

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

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

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

相关文章

[知识分享]华为铁三角工作法

在通信技术领域&#xff0c;尤其是无线通信和物联网领域&#xff0c;“华为铁三角”是华为公司内部的一种销售、交付和服务一体化的运作模式。这种模式强调的是以客户为中心&#xff0c;通过市场、销售、交付和服务三个关键环节的紧密协作&#xff0c;快速响应客户需求&#xf…

2.12 滑动条事件

目录 实验原理 实验代码 运行结果 实验原理 在 OpenCV 中&#xff0c;滑动条设计的主要目的是在视频播放帧中选择特定帧&#xff0c;而在调节图像参数时也会经常用到。在使用滑动条前&#xff0c;需要给滑动条赋予一个名字&#xff08;通常是一个字符串&#xff09;&#x…

Java | Leetcode Java题解之第388题文件的最长绝对路径

题目&#xff1a; 题解&#xff1a; class Solution {public int lengthLongestPath(String input) {int n input.length();int pos 0;int ans 0;int[] level new int[n 1];while (pos < n) {/* 检测当前文件的深度 */int depth 1;while (pos < n && inpu…

Mamba:超越Transformer的新一代神经网络架构

在过去的七年里&#xff0c;Transformer一直在语言建模领域占据着主导地位。然而&#xff0c;现在有一个新兴的神经网络架构Mamba&#xff0c;正在挑战Transformer的霸主地位。虽然目前Mamba仅在规模较小的模型上进行了测试&#xff08;参数量达到数十亿&#xff09;&#xff0…

华为OD机试真题 - 构成正方形的数量(Java/Python/JS/C/C++ 2024 B卷 100分)

华为OD机试 2024E卷题库疯狂收录中&#xff0c;刷题点这里 专栏导读 本专栏收录于《华为OD机试&#xff08;JAVA&#xff09;真题&#xff08;E卷D卷A卷B卷C卷&#xff09;》。 刷的越多&#xff0c;抽中的概率越大&#xff0c;私信哪吒&#xff0c;备注华为OD&#xff0c;加…

MySQL密码策略更改(临时+永久)

目录 1、查看数据库当前密码策略 2、查看密码插件&#xff1a; 3、官方文档策略定义 4、更改密码策略 临时修改 &#xff08;1&#xff09;更改密码策略为LOW&#xff0c;改为LOW或0 &#xff08;2&#xff09;更改密码长度 &#xff08;3&#xff09;设置大小写、数字…

【操作系统】操作系统运行环境——中断与异常

中断与异常 导读一、中断机制1.1 中断机制的重要性 二、中断与异常的基本概念2.1 中断与异常的个人理解2.2 内中断与外中断 三、中断与异常的分类四、中断与异常的处理过程结语 导读 大家好&#xff0c;很高兴又和大家见面啦&#xff01;&#xff01;&#xff01; 在上一篇内…

【C++ | 设计模式】简单工厂模式的详解与实现

1.简单工厂模式概述 简单工厂模式&#xff08;Simple Factory Pattern&#xff09;是一种创建型设计模式&#xff0c;它定义了一个工厂类&#xff0c;由这个类根据提供的参数决定创建哪种具体的产品对象。简单工厂模式将对象的创建逻辑集中到一个工厂类中&#xff0c;从而将对…

认知杂谈32

今天分享 有人说的一段争议性的话 I I 《恋爱中的价值难题》 咱就认识个31岁的哥们&#xff0c;事业有成&#xff0c;一年能挣35 万。他现在正为找对象的事儿犯愁呢。他想找个年轻漂亮的小姑娘谈对象&#xff0c;可又不想在感情上投入太多&#xff0c;就想一边乐呵着&#x…

Linux(CentOS)同步服务器时间之~ntpd

NTP 是 Network Time Protocol&#xff08;网络时间协议&#xff09;的缩写&#xff0c;它是一种用于在计算机系统之间同步时间的协议。NTP 允许网络中的设备通过与一个或多个时间服务器进行通信&#xff0c;来校正自身的系统时钟&#xff0c;确保所有设备上的时间保持高度一致…

演示:基于WPF的DrawingVisual和谷歌地图瓦片开发的地图(完全独立不依赖第三方库)

一、目的&#xff1a;基于WPF的DrawingVisual和谷歌地图瓦片开发的地图 二、预览 三、环境 VS2022&#xff0c;Net7,DrawingVisual&#xff0c;谷歌地图瓦片 四、主要功能 地图缩放&#xff0c;平移&#xff0c;定位 真实经纬度 显示瓦片信息 显示真实经纬度和经纬线 省市县…

[环境配置]Pycharm手动安装汉化插件

在Pycharm-file-setting-Plugins中&#xff0c;搜索chinese&#xff0c;就会出现汉化包 点击install后&#xff0c;在安装时出现这种报错&#xff1a;Plugin "Chinese (Simplified) Language Pack / 中文语言包" was not installed: Invalid filename returned by a …

用 jsPDF 让 PDF 生成触手可及

jsPDF &#xff1a;在浏览器中生成 PDF&#xff0c;从未如此简单- 精选真开源&#xff0c;释放新价值。 概览 jsPDF 是一个开源的 JavaScript 库&#xff0c;专为在浏览器端生成 PDF 文档而设计。它通过提供一个直观且易于使用的 API&#xff0c;使得开发者能够快速地将 PDF 生…

【Kubernetes】持久卷 PV

持久卷 PV 1.什么是持久卷2.创建一个持久卷3.持久卷的访问模式4.持久卷的回收策略 数据卷是在创建 Pod 时通过 挂载目录 来实现数据的共享和持久化的。但是在一个大型系统中&#xff0c;这种方式是非常不利于管理的&#xff0c;因为数据卷把数据的 持久存储 和 供应使用 封装在…

短时傅里叶变换(Short-Time Fourier Transform, STFT),语音识别

高能预警&#xff01;&#xff01;&#xff01; .wav文件为笔者亲自一展歌喉录制的噪声&#xff0c;在家中播放&#xff0c;可驱赶耗子&#xff0c;蟑螂 介绍 短时傅里叶变换&#xff08;Short-Time Fourier Transform, STFT&#xff09;是一种时频分析方法&#xff0c;用于…

智能分拣投递机器人

产品介绍 自研智能分拣投递机器人&#xff0c;专注于物流行业“NC小件”的分拣与投递&#xff0c;机器人运行稳定、分拣效率高&#xff0c;搭配智能分拣投递系统单台机器人最大作业效率可达400件/H&#xff0c;投递效率相较于传统“小黄人“提升了30%-50%&#xff0c;可替代“…

生成艺术,作品鉴赏:物似主人形

2001年&#xff0c;当21岁的我&#xff0c;还在恒基伟业当高级工程师时。我有一个女同事&#xff0c;她有个特别大的杯子用来喝水&#xff0c;不夸张的说&#xff0c;是那种我从来没见过的大杯子&#xff0c;由于她是很大只的那种&#xff0c;她便自嘲说&#xff1a;「物似主人…

RAG增强的视觉问答开发框架

检索增强生成 (RAG) 是一种强大的技术&#xff0c;可以提高大型语言模型 (LLM) 生成的答案的准确性和可靠性。它还提供了检查模型在特定生成过程中使用的源的可能性&#xff0c;从而使人类用户更容易进行事实核查。此外&#xff0c;RAG 可以使模型知识保持最新状态并整合特定主…

前端进阶| 深入学习面向对象设计原则

引言 面向对象编程&#xff08;Object-Oriented Programming&#xff0c;OOP&#xff09;是一种常用的编程范式&#xff0c;它通过将数据和与之相关的操作封装在一起&#xff0c;提供了一种更有组织和易于理解的方式来构建应用程序。在JavaScript中&#xff0c;我们可以使用面…

【持续更新】【Google Play版】淘宝最新国际版10.36.10.20启动更快

功能和国内比基本是差不多的&#xff0c;只不过没有应用内乱七八糟的弹窗&#xff0c;用起来比较舒服&#xff0c;启动也比较快。 像这种软件如何保证是 官方 的呢&#xff1f;毕竟涉及到财产&#xff0c;还是要小心些的。 很简单&#xff0c;修改过的 app 会提示“签名不一致…