具有 3 列的 Dataframe 的数据可视化

数据挖掘 Python 绘图 matplotlib
2022-02-19 14:27:06

我有以下数据,我正在寻找一种有效的可视化或图形方法(在 Python 中)来了解错误是如何相对于最小值和最大值分布的。

Data_X_err.head()
Out[137]: 
     min    max   err
0  35435  35933  1.40
1  35155  36382  3.43
2  35305  36042  2.07
3  35216  36225  2.82
4  35196  36259  2.98

谢谢你。

1个回答

使用 matplotlib:

import matplotlib.pyplot as plt
%matplotlib inline
f, (ax1, ax2) = plt.subplots(1, 2)
ax1.plt(Data_X_err.min, Data_X_err.err)
ax2.plt(Data_X_err.max, Data_X_err.err)

或者,您可以使用 seaborn 的 pairplot

import seaborn as sns
%matplotlib inline
sns.set(style="ticks")

sns.pairplot(df)

在此处输入图像描述