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

news2024/10/3 11:18:06

目录

一、用法精讲

591、pandas.DataFrame.plot方法

591-1、语法

591-2、参数

591-3、功能

591-4、返回值

591-5、说明

591-6、用法

591-6-1、数据准备

591-6-2、代码示例

591-6-3、结果输出

592、pandas.DataFrame.plot.area方法

592-1、语法

592-2、参数

592-3、功能

592-4、返回值

592-5、说明

592-6、用法

592-6-1、数据准备

592-6-2、代码示例

592-6-3、结果输出

593、pandas.DataFrame.plot.bar方法

593-1、语法

593-2、参数

593-3、功能

593-4、返回值

593-5、说明

593-6、用法

593-6-1、数据准备

593-6-2、代码示例

593-6-3、结果输出

594、pandas.DataFrame.plot.barh方法

594-1、语法

594-2、参数

594-3、功能

594-4、返回值

594-5、说明

594-6、用法

594-6-1、数据准备

594-6-2、代码示例

594-6-3、结果输出

595、pandas.DataFrame.plot.box方法

595-1、语法

595-2、参数

595-3、功能

595-4、返回值

595-5、说明

595-6、用法

595-6-1、数据准备

595-6-2、代码示例

595-6-3、结果输出

二、推荐阅读

1、Python筑基之旅

2、Python函数之旅

3、Python算法之旅

4、Python魔法之旅

5、博客个人主页
​​​​​​​

一、用法精讲

591、pandas.DataFrame.plot方法
591-1、语法
# 591、pandas.DataFrame.plot方法
pandas.DataFrame.plot(*args, **kwargs)
Make plots of Series or DataFrame.

Uses the backend specified by the option plotting.backend. By default, matplotlib is used.

Parameters:
dataSeries or DataFrame
The object for which the method is called.

xlabel or position, default None
Only used if data is a DataFrame.

ylabel, position or list of label, positions, default None
Allows plotting of one column versus another. Only used if data is a DataFrame.

kindstr
The kind of plot to produce:

‘line’ : line plot (default)

‘bar’ : vertical bar plot

‘barh’ : horizontal bar plot

‘hist’ : histogram

‘box’ : boxplot

‘kde’ : Kernel Density Estimation plot

‘density’ : same as ‘kde’

‘area’ : area plot

‘pie’ : pie plot

‘scatter’ : scatter plot (DataFrame only)

‘hexbin’ : hexbin plot (DataFrame only)

axmatplotlib axes object, default None
An axes of the current figure.

subplotsbool or sequence of iterables, default False
Whether to group columns into subplots:

False : No subplots will be used

True : Make separate subplots for each column.

sequence of iterables of column labels: Create a subplot for each group of columns. For example [(‘a’, ‘c’), (‘b’, ‘d’)] will create 2 subplots: one with columns ‘a’ and ‘c’, and one with columns ‘b’ and ‘d’. Remaining columns that aren’t specified will be plotted in additional subplots (one per column).

New in version 1.5.0.

sharexbool, default True if ax is None else False
In case subplots=True, share x axis and set some x axis labels to invisible; defaults to True if ax is None otherwise False if an ax is passed in; Be aware, that passing in both an ax and sharex=True will alter all x axis labels for all axis in a figure.

shareybool, default False
In case subplots=True, share y axis and set some y axis labels to invisible.

layouttuple, optional
(rows, columns) for the layout of subplots.

figsizea tuple (width, height) in inches
Size of a figure object.

use_indexbool, default True
Use index as ticks for x axis.

titlestr or list
Title to use for the plot. If a string is passed, print the string at the top of the figure. If a list is passed and subplots is True, print each item in the list above the corresponding subplot.

gridbool, default None (matlab style default)
Axis grid lines.

legendbool or {‘reverse’}
Place legend on axis subplots.

stylelist or dict
The matplotlib line style per column.

logxbool or ‘sym’, default False
Use log scaling or symlog scaling on x axis.

logybool or ‘sym’ default False
Use log scaling or symlog scaling on y axis.

loglogbool or ‘sym’, default False
Use log scaling or symlog scaling on both x and y axes.

xtickssequence
Values to use for the xticks.

ytickssequence
Values to use for the yticks.

xlim2-tuple/list
Set the x limits of the current axes.

ylim2-tuple/list
Set the y limits of the current axes.

xlabellabel, optional
Name to use for the xlabel on x-axis. Default uses index name as xlabel, or the x-column name for planar plots.

Changed in version 2.0.0: Now applicable to histograms.

ylabellabel, optional
Name to use for the ylabel on y-axis. Default will show no ylabel, or the y-column name for planar plots.

Changed in version 2.0.0: Now applicable to histograms.

rotfloat, default None
Rotation for ticks (xticks for vertical, yticks for horizontal plots).

fontsizefloat, default None
Font size for xticks and yticks.

colormapstr or matplotlib colormap object, default None
Colormap to select colors from. If string, load colormap with that name from matplotlib.

colorbarbool, optional
If True, plot colorbar (only relevant for ‘scatter’ and ‘hexbin’ plots).

positionfloat
Specify relative alignments for bar plot layout. From 0 (left/bottom-end) to 1 (right/top-end). Default is 0.5 (center).

tablebool, Series or DataFrame, default False
If True, draw a table using the data in the DataFrame and the data will be transposed to meet matplotlib’s default layout. If a Series or DataFrame is passed, use passed data to draw a table.

yerrDataFrame, Series, array-like, dict and str
See Plotting with Error Bars for detail.

xerrDataFrame, Series, array-like, dict and str
Equivalent to yerr.

stackedbool, default False in line and bar plots, and True in area plot
If True, create stacked plot.

secondary_ybool or sequence, default False
Whether to plot on the secondary y-axis if a list/tuple, which columns to plot on secondary y-axis.

mark_rightbool, default True
When using a secondary_y axis, automatically mark the column labels with “(right)” in the legend.

include_boolbool, default is False
If True, boolean values can be plotted.

backendstr, default None
Backend to use instead of the backend specified in the option plotting.backend. For instance, ‘matplotlib’. Alternatively, to specify the plotting.backend for the whole session, set pd.options.plotting.backend.

**kwargs
Options to pass to matplotlib plotting method.

Returns:
matplotlib.axes.Axes
or numpy.ndarray of them
If the backend is not the default matplotlib one, the return value will be the object returned by the backend.

Notes

See matplotlib documentation online for more on this subject

If kind = ‘bar’ or ‘barh’, you can specify relative alignments for bar plot layout by position keyword. From 0 (left/bottom-end) to 1 (right/top-end). Default is 0.5 (center).
591-2、参数

591-2-1、data(必须)DataFrame,表示待绘制的数据,必须是一个DataFrame对象。

591-2-2、x(可选,默认值为None)label or position,用作x轴值的列标签或列的位置。

591-2-3、y(可选,默认值为None)label、position or list of label/position,表示列标签或列的位置,用于绘制y轴,如果没有指定,则会绘制所有数值列。

591-2-4、kind(可选,默认值为'line')字符串,指定图的类型,可以是以下几种:

  • 'line':折线图(默认值)
  • 'bar':垂直条形图
  • 'barh':水平条形图
  • 'hist':直方图
  • 'box':箱线图
  • 'kde':Kernel Density Estimation图
  • 'density':同'kde'
  • 'area':面积图
  • 'pie':饼图
  • 'scatter'散点图(需要指定x和y)
  • 'hexbin':六边形图(需要指定x和y)

591-2-5、ax(可选,默认值为None)matplotlib axes object,表示要在其上绘制的axes对象。

591-2-6、subplots(可选,默认值为False)布尔值,是否为每一列绘制一个子图。

591-2-7、sharex(可选,默认值为False)布尔值,如果subplots=True,子图是否共享x轴。

591-2-8、sharey(可选,默认值为False)布尔值,如果subplots=True,子图是否共享y轴。

591-2-9、layout(可选,默认值为None)元组,表示子图的布局,(行, 列)格式。

591-2-10、figsize(可选,默认值为None)元组,图的尺寸,(宽, 高)格式。

591-2-11、use_index(可选,默认值为True)布尔值,是否将DataFrame的索引用作x轴标签。

591-2-12、title(必须)字符串或列表,表示图的标题。

591-2-13、grid(可选,默认值为None)布尔值,是否显示网格。

591-2-14、legend(可选,默认值为True)布尔值,是否显示图例。

591-2-15、style(可选,默认值为None)列表或字典,样式字符串或dict对象,用于定制线条样式。

591-2-16、logx(可选,默认值为False)布尔值,是否使用x轴的对数刻度。

591-2-17、logy(可选,默认值为False)布尔值,是否使用y轴的对数刻度。

591-2-18、loglog(可选,默认值为False)布尔值,是否对x轴和y轴都使用对数刻度。

591-2-19、xticks(可选,默认值为None)sequence,自定义x轴刻度。

591-2-20、yticks(可选,默认值为None)sequence,自定义y轴刻度。

591-2-21、xlim(可选,默认值为None)2-tuple,x轴的限制(min, max)。

591-2-22、ylim(可选,默认值为None)2-tuple,y轴的限制(min, max)。

591-2-23、rot(可选,默认值为None)整数,x轴标签的旋转角度。

591-2-24、fontsize(可选,默认值为None)整数,x轴和y轴标签的字体大小。

591-2-25、colormap(可选,默认值为None)字符串或可迭代对象,颜色映射或colormap。

591-2-26、position(可选,默认值为0.5)浮点数,条的位置(仅用于条形图)。

591-2-27、table(可选,默认值为False)bool、DataFrame or Series,如果为True,将数据添加到图表中作为数据表,如果是DataFrame,则绘制该表的数据;如果是Series,则绘制该Series的数据。

591-2-28、yerr(必须)str or DataFrame or array,y轴的误差条。

591-2-29、xerr(必须)str or DataFrame or array,x轴的误差条。

591-2-30、stacked(可选,默认值为False)布尔值,如果为True,堆积条形图。

591-2-31、sort_columns(可选,默认值为False)布尔值,是否按列标签排序。

591-3、功能

        用来绘制基于DataFrame数据的各种类型的图,它是一个高度便利的函数,结合了pandas和matplotlib的功能,可以迅速生成高质量的可视化图表,便于数据分析和展示。

591-4、返回值

        如果subplots=False,返回matplotlib.axes.Axes对象;如果subplots=True,返回numpy.ndarray数组,其中每个元素都是matplotlib.axes.Axes对象。

591-5、说明

        无

591-6、用法
591-6-1、数据准备
591-6-2、代码示例
# 591、pandas.DataFrame.plot方法
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt  # 需要导入 matplotlib
# 创建示例数据
df = pd.DataFrame({
    'A': np.random.randn(1000),
    'B': np.random.randn(1000),
    'C': np.random.randn(1000),
    'D': np.random.randn(1000)
})
# 绘制折线图
fig, ax = plt.subplots()  # 创建新的图和轴对象
df.plot(x='A', y='B', kind='line', ax=ax, title='Line Plot')
plt.show()  # 显示折线图
# 绘制散点图
fig, ax = plt.subplots()
df.plot(x='A', y='B', kind='scatter', ax=ax, title='Scatter Plot')
plt.show()  # 显示散点图
591-6-3、结果输出
# 591、pandas.DataFrame.plot方法
见图1
见图2

图1(类似):

图2(类似):

 

592、pandas.DataFrame.plot.area方法
592-1、语法
# 592、pandas.DataFrame.plot.area方法
pandas.DataFrame.plot.area(x=None, y=None, stacked=True, **kwargs)
Draw a stacked area plot.

An area plot displays quantitative data visually. This function wraps the matplotlib area function.

Parameters:
x
label or position, optional
Coordinates for the X axis. By default uses the index.

y
label or position, optional
Column to plot. By default uses all columns.

stacked
bool, default True
Area plots are stacked by default. Set to False to create a unstacked plot.

**kwargs
Additional keyword arguments are documented in DataFrame.plot().

Returns:
matplotlib.axes.Axes or numpy.ndarray
Area plot, or array of area plots if subplots is True.
592-2、参数

592-2-1、x(可选,默认值为None)字符串或序列,指定用于绘制x轴的数据列,如果没有提供,将根据DataFrame的索引来绘图。

592-2-2、y(可选,默认值为None)字符串、序列或列表,指定用于绘制y轴的数据列,如果为None,所有列将被用于绘图。

592-2-3、stacked(可选,默认值为True)布尔值,如果为True,绘制堆叠面积图;如果为False,绘制重叠面积图。

592-2-4、**kwargs(可选)字典,其他绘图参数,通常用于设置线条颜色、透明度、标签、标题等,例如color、alpha、label、title等。

592-3、功能

        用于创建面积图,可以有效显示不同类别数据随时间的趋势变化,以及它们之间的相对大小关系。

592-3-1、堆叠面积图:通过设置stacked=True,可以清晰地展示各个类别的相对大小。

592-3​​​​​​​-2、重叠面积图:通过设置stacked=False,可以观察不同类别之间的重叠情况。

592-4、返回值

        返回一个Matplotlib的Axes对象,这使得用户可以对图形进行进一步的定制和保存操作。

592-5、说明

        无

592-6、用法
592-6-1、数据准备
592-6-2、代码示例
# 592、pandas.DataFrame.plot.area方法
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib

# 配置字体,确保中文字符正常显示
matplotlib.rcParams['font.sans-serif'] = ['Microsoft YaHei']
matplotlib.rcParams['axes.unicode_minus'] = False  # 解决负号 '-' 显示问题
# 示例数据
data = {'A': [1, 2, 3, 4], 'B': [2, 3, 4, 5], 'C': [3, 4, 1, 2]}
df = pd.DataFrame(data)
# 绘制堆叠面积图
df.plot.area(stacked=True)
plt.title("堆叠面积图")
plt.xlabel("时间")
plt.ylabel("值")
plt.show()
592-6-3、结果输出
# 592、pandas.DataFrame.plot.area方法
见图3

图3:

 

593、pandas.DataFrame.plot.bar方法
593-1、语法
# 593、pandas.DataFrame.plot.bar方法
pandas.DataFrame.plot.bar(x=None, y=None, **kwargs)
Vertical bar plot.

A bar plot is a plot that presents categorical data with rectangular bars with lengths proportional to the values that they represent. A bar plot shows comparisons among discrete categories. One axis of the plot shows the specific categories being compared, and the other axis represents a measured value.

Parameters:
x
label or position, optional
Allows plotting of one column versus another. If not specified, the index of the DataFrame is used.

y
label or position, optional
Allows plotting of one column versus another. If not specified, all numerical columns are used.

color
str, array-like, or dict, optional
The color for each of the DataFrame’s columns. Possible values are:

A single color string referred to by name, RGB or RGBA code,
for instance ‘red’ or ‘#a98d19’.

A sequence of color strings referred to by name, RGB or RGBA
code, which will be used for each column recursively. For instance [‘green’,’yellow’] each column’s bar will be filled in green or yellow, alternatively. If there is only a single column to be plotted, then only the first color from the color list will be used.

A dict of the form {column namecolor}, so that each column will be
colored accordingly. For example, if your columns are called a and b, then passing {‘a’: ‘green’, ‘b’: ‘red’} will color bars for column a in green and bars for column b in red.

**kwargs
Additional keyword arguments are documented in DataFrame.plot().

Returns:
matplotlib.axes.Axes or np.ndarray of them
An ndarray is returned with one matplotlib.axes.Axes per column when subplots=True.
593-2、参数

593-2-1、x(可选,默认值为None)字符串或序列,指定用于绘制x轴的数据列,如果没有提供,将根据DataFrame的索引来绘图。

593-2-2、y(可选,默认值为None)字符串、序列或列表,指定用于绘制y轴的数据列,如果为None,将根据DataFrame的其他列进行绘图。

593-2-3、**kwargs(可选)字典,其他绘图参数,例如label、title、xlabel、ylabel等,用于设置图例标签、标题和坐标轴标签等。

593-3、功能

        用于创建条形图,适合于展示分类数据的比较,常用来:

593-3-1、比较不同类别之间的数量或值。

593-3-2、显示时间序列数据的变化情况,如果将时间作为类别,则可以观察某一时间段内不同类别的表现。

593-4、返回值

        返回一个Matplotlib的Axes对象,这允许用户对图形进行进一步的定制和保存。

593-5、说明

        无

593-6、用法
593-6-1、数据准备
593-6-2、代码示例
# 593、pandas.DataFrame.plot.bar方法
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib

# 配置字体,确保中文字符正常显示
matplotlib.rcParams['font.sans-serif'] = ['Microsoft YaHei']
matplotlib.rcParams['axes.unicode_minus'] = False  # 解决负号 '-' 显示问题
# 示例数据
data = {'类别': ['A', 'B', 'C', 'D'], '值': [3, 7, 5, 8]}
df = pd.DataFrame(data)
# 绘制条形图
df.plot.bar(x='类别', y='值', color='purple', alpha=0.7)
plt.title("条形图示例")
plt.xlabel("类别")
plt.ylabel("值")
plt.grid(axis='y')
plt.show()
593-6-3、结果输出
# 593、pandas.DataFrame.plot.bar方法
见图4

图4:

 

594、pandas.DataFrame.plot.barh方法
594-1、语法
# 594、pandas.DataFrame.plot.barh方法
pandas.DataFrame.plot.barh(x=None, y=None, **kwargs)
Make a horizontal bar plot.

A horizontal bar plot is a plot that presents quantitative data with rectangular bars with lengths proportional to the values that they represent. A bar plot shows comparisons among discrete categories. One axis of the plot shows the specific categories being compared, and the other axis represents a measured value.

Parameters:
x
label or position, optional
Allows plotting of one column versus another. If not specified, the index of the DataFrame is used.

y
label or position, optional
Allows plotting of one column versus another. If not specified, all numerical columns are used.

color
str, array-like, or dict, optional
The color for each of the DataFrame’s columns. Possible values are:

A single color string referred to by name, RGB or RGBA code,
for instance ‘red’ or ‘#a98d19’.

A sequence of color strings referred to by name, RGB or RGBA
code, which will be used for each column recursively. For instance [‘green’,’yellow’] each column’s bar will be filled in green or yellow, alternatively. If there is only a single column to be plotted, then only the first color from the color list will be used.

A dict of the form {column namecolor}, so that each column will be
colored accordingly. For example, if your columns are called a and b, then passing {‘a’: ‘green’, ‘b’: ‘red’} will color bars for column a in green and bars for column b in red.

**kwargs
Additional keyword arguments are documented in DataFrame.plot().

Returns:
matplotlib.axes.Axes or np.ndarray of them
An ndarray is returned with one matplotlib.axes.Axes per column when subplots=True.
594-2、参数

594-2-1、x(可选,默认值为None)字符串或序列,指定用于绘制x轴的数据列,如果没有提供,将根据DataFrame的索引来绘图。

594-2-2、y(可选,默认值为None)字符串、序列或列表,指定用于绘制y轴的数据列,如果为None,将根据DataFrame的其他列进行绘图。

594-2-3、**kwargs(可选)字典,其他绘图参数,例如label、title、xlabel、ylabel等,用于设置图例标签、标题和坐标轴标签等。

594-3、功能

        用于创建水平条形图,适合于展示分类数据的比较,常用来:

594-3-1、比较不同类别之间的数量或值,尤其在类别名称较长时,更易于展示。

594-3-2、显示时间序列数据的变化情况,如果将时间作为类别,则可以观察某一时间段内不同类别的表现。

594-4、返回值

        返回一个Matplotlib的Axes对象,允许用户对图形进行进一步的定制和保存。

594-5、说明

        无

594-6、用法
594-6-1、数据准备
594-6-2、代码示例
# 594、pandas.DataFrame.plot.barh方法
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
# 配置字体,确保中文字符正常显示
matplotlib.rcParams['font.sans-serif'] = ['Microsoft YaHei']
matplotlib.rcParams['axes.unicode_minus'] = False  # 解决负号 '-' 显示问题
# 示例数据
data = {'类别': ['A', 'B', 'C', 'D'], '值': [3, 7, 5, 8]}
df = pd.DataFrame(data)
# 绘制水平条形图
df.plot.barh(x='类别', y='值', color='green', alpha=0.7)
plt.title("水平条形图示例")
plt.xlabel("值")
plt.ylabel("类别")
plt.grid(axis='x')
plt.show()
594-6-3、结果输出
# 594、pandas.DataFrame.plot.barh方法
见图5

图5:

 

595、pandas.DataFrame.plot.box方法
595-1、语法
# 595、pandas.DataFrame.plot.box方法
pandas.DataFrame.plot.box(by=None, **kwargs)
Make a box plot of the DataFrame columns.

A box plot is a method for graphically depicting groups of numerical data through their quartiles. The box extends from the Q1 to Q3 quartile values of the data, with a line at the median (Q2). The whiskers extend from the edges of box to show the range of the data. The position of the whiskers is set by default to 1.5*IQR (IQR = Q3 - Q1) from the edges of the box. Outlier points are those past the end of the whiskers.

For further details see Wikipedia’s entry for boxplot.

A consideration when using this chart is that the box and the whiskers can overlap, which is very common when plotting small sets of data.

Parameters:
bystr or sequence
Column in the DataFrame to group by.

Changed in version 1.4.0: Previously, by is silently ignore and makes no groupings

**kwargs
Additional keywords are documented in DataFrame.plot().

Returns:
matplotlib.axes.Axes
or numpy.ndarray of them.
595-2、参数

595-2-1、by(可选,默认值为None)字符串或序列,用于分组的列或列名,传入后,箱线图将根据该列的不同值进行分组绘制,能够对比不同类别的数据分布。

595-2-2、**kwargs(可选)字典,其他绘图参数,可用于定制图形外观,例如:

  • color: 设置箱体和须的颜色。
  • grid: bool,是否显示网格线,默认False。
  • fontsize: 设置坐标轴的字体大小。
  • title: 图标题。
  • xlabel / ylabel: 坐标轴标签。
  • widths: float,设置箱体的宽度
595-3、功能

        用于创建箱线图,适用于以下场景:

595-3-1、数据分布: 可视化连续数据的五数概括,包括最小值、第一四分位数、中位数、第三四分位数和最大值。

595-3-2、异常值检测: 通过箱子外的点来识别异常值。

595-3​​​​​​​-3、比较组间差异: 利用by参数,能够比较不同组(类别)之间的数据分布差异。

595-4、返回值

        返回一个Matplotlib的Axes对象,允许用户对图形进行进一步的定制和保存。

595-5、说明

        无

595-6、用法
595-6-1、数据准备
595-6-2、代码示例
# 595、pandas.DataFrame.plot.box方法
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
# 配置字体,确保中文字符正常显示
matplotlib.rcParams['font.sans-serif'] = ['Microsoft YaHei']
matplotlib.rcParams['axes.unicode_minus'] = False  # 解决负号 '-' 显示问题
# 示例数据
data = {
    '类别': ['A', 'A', 'A', 'B', 'B', 'B'],
    '值': [1, 2, 5, 5, 6, 7]
}
df = pd.DataFrame(data)
# 绘制箱线图
df.plot.box(by='类别', grid=True, title="箱线图示例", fontsize=12)
plt.ylabel("值")
plt.show()
595-6-3、结果输出
# 595、pandas.DataFrame.plot.box方法
见图6

图6:

 

二、推荐阅读

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

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

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

相关文章

9.28学习笔记

1.ping 网址 2.ssh nscc/l20 3.crtl,打开vscode的setting 4.win 10修改ssh配置文件及其密钥权限为600 - 晴云孤魂 - 博客园 整体来看: 使用transformer作为其主干网络,代替了原先的UNet 在latent space进行训练,通过transformer处理潜…

查缺补漏----该不该考虑不可屏蔽中断

可以看看这个视频: 讨论中断时,该不该考虑不可屏蔽中断?_哔哩哔哩_bilibili 首先要知道一个概念:可屏蔽中断和不可屏蔽中断 可屏蔽中断: 可屏蔽中断是可通过中断屏蔽字来启用或禁用的中断。对于多级中断而言&#…

①EtherCAT转ModbusTCP, EtherCAT/Ethernet/IP/Profinet/ModbusTCP协议互转工业串口网关

EtherCAT/Ethernet/IP/Profinet/ModbusTCP协议互转工业串口网关https://item.taobao.com/item.htm?ftt&id822721028899 协议转换通信网关 EtherCAT 转 ModbusTCP GW系列型号 MS-GW15 简介 MS-GW15 是 EtherCAT 和 Modbus TCP 协议转换网关,为用户提供一种 …

map_set的使用

map_set的使用 关联式容器树形结构的关联式容器setset的介绍set的使用 multisetmultiset的介绍multiset的使用 mapmap的介绍map的使用键值对 multimapmultimap的介绍 🌏个人博客主页:个人主页 关联式容器 在初阶阶段,我们已经接触过STL中的部…

黑科技外绘神器:一键扩展图像边界

黑科技外绘神器:一键扩展图像边界 Diffusers Image Outpaint✨是一个开源工具,能智能扩展图像边界,创造完美视觉效果🏞️。用户可自定义风格,生成高清图像🤩,应用场景广泛,释放你的…

大模型~合集6

我自己的原文哦~ https://blog.51cto.com/whaosoft/11566566 # 深度模型融合(LLM/基础模型/联邦学习/微调等) 23年9月国防科大、京东和北理工的论文“Deep Model Fusion: A Survey”。 深度模型融合/合并是一种新兴技术,它将多个深度学习模…

爬虫——爬取小音乐网站

爬虫有几部分功能??? 1.发请求,获得网页源码 #1.和2是在一步的 发请求成功了之后就能直接获得网页源码 2.解析我们想要的数据 3.按照需求保存 注意:开始爬虫前,需要给其封装 headers {User-…

本地化测试对游戏漏洞修复的影响

本地化测试在游戏开发的质量保证过程中起着至关重要的作用,尤其是在修复bug方面。当游戏为全球市场做准备时,它们通常会被翻译和改编成各种语言和文化背景。这种本地化带来了新的挑战,例如潜在的语言错误、文化误解,甚至是不同地区…

C++ 双端队列(deque)的深入理解

前言: 双端队列deque看起来是一个相当牛的容器,表面看起来将list和vector进行结合起来,形成了一个看起来很完美的容器,但是事实不是这样,要是deque如此完美,数据结构也就没list和vector的事情了&#xff0c…

多系统萎缩患者必看!这些维生素助你对抗病魔

亲爱的朋友们,今天我们来聊聊一个相对陌生但重要的健康话题——多系统萎缩(MSA)。这是一种罕见的神经系统疾病,影响着患者的自主神经系统、运动系统和平衡功能。面对这样的挑战,科学合理的饮食和营养补充显得尤为重要。…

暴力数据结构——AVL树

1.认识AVL树 AVL树最先发明的⾃平衡⼆叉查找树,AVL可以是⼀颗空树,或者具备下列性质的⼆叉搜索树: • 它的左右⼦树都是AV树,且左右⼦树的⾼度差的绝对值不超过1 • AVL树是⼀颗⾼度平衡搜索⼆叉树, 通过控制⾼度差去控制平衡 AVL树整体结点…

路由交换实验指南

案例 01:部署使用 eNSP 平台实验需求: 安装华为 eNSP 网络模拟平台打开 eNSP 平台,新建拓扑并绘制网络能够成功启动交换机、计算机设备 实验步骤: 安装华为 eNSP 网络模拟平台启动安装程序 配置安装内容 防护墙允许 eNSP 程序的…

IDTL:茶叶病害识别数据集(猫脸码客 第205期)

Identifying Disease in Tea Leaves茶叶病害识别数据集 一、引言 在农业领域,茶叶作为一种重要的经济作物,其生产过程中的病害防治是确保茶叶质量和产量的关键环节。然而,传统的病害识别方法主要依赖于人工观察和经验判断,这不仅…

从零开始实现RPC框架---------项目介绍及环境准备

一,介绍 RPC(Remote Procedure Call)远程过程调⽤,是⼀种通过⽹络从远程计算机上请求服务,⽽不需要 了解底层⽹络通信细节。RPC可以使⽤多种⽹络协议进⾏通信, 如HTTP、TCP、UDP等, 并且在 TCP/…

匿名方法与Lambda表达式+泛型委托

匿名方法 和委托搭配使用,方便我们快速对委托进行传参,不需要我们定义一个新的函数,直接用delegate关键字代替方法名,后面跟上参数列表与方法体。 格式:delegate(参数列表){方法体} lambda表达式 是匿名方法的升级…

Brave编译指南2024 MacOS篇-环境配置(四)

引言 在上一篇文章中,我们成功获取了Brave浏览器的源代码。现在,我们将进入编译过程的关键阶段:环境配置。正确的环境配置对于成功编译Brave浏览器至关重要,它能确保所有必要的工具和依赖项都已就位,并且版本兼容。 …

JAVAIDEA初始工程的创建

四结构 建工程综述* 初始*: 1、先建个空项目, 2、打开文件中的项目结构新建module模块(模块下有src) 修改模块名: 也是Refactor,Rename,但是要选第三个同时改模块和文件夹名字 导入模块&am…

【Python】ftfy 使用指南:修复 Unicode 编码问题

ftfy(fixes text for you)是一个专为修复各种文本编码错误而设计的 Python 工具。它的主要目标是将损坏的 Unicode 文本恢复为正确的 Unicode 格式。ftfy 并非用于处理非 Unicode 编码,而是旨在修复因为编码不一致、解码错误或混合编码导致的…

【Python】path:简化文件路径处理的 Python 库

path 是一个 Python 库,提供了对文件系统路径的简洁抽象,使文件和目录操作更加直观和 Pythonic。该库建立在 pathlib 的基础上,扩展了文件路径处理的功能,使得开发者能够更高效地进行文件操作,如文件读写、目录遍历、路…

Redis缓存穿透雪崩击穿及解决

封装缓存空对象解决缓存穿透与逻辑过期解决缓存击穿工具类 Slf4j Component public class CacheClient {private final StringRedisTemplate stringRedisTemplate;public CacheClient(StringRedisTemplate stringRedisTemplate) {this.stringRedisTemplate stringRedisTemplat…