合并之后我想对其中两列进行可视化分析怎末写
时间: 2023-08-08 13:04:20 浏览: 222
你可以使用 Python 中的 Matplotlib 或者 Seaborn 等库进行数据可视化分析。
以下是一个简单的示例代码,假设你想要分析合并后的表格中的 "age" 和 "income" 两列:
```python
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# 读取合并后的表格
merged = pd.read_excel('merged.xlsx')
# 绘制散点图
sns.scatterplot(data=merged, x='age', y='income')
# 显示图形
plt.show()
```
其中,`sns.scatterplot()` 方法可以用于绘制散点图,`x` 参数和 `y` 参数分别指定横轴和纵轴要绘制的列名。你可以通过修改这些参数来绘制不同的图形。
你只需要将上面的代码中的 `merged.xlsx` 替换成你的合并后的表格文件名,然后运行即可。
阅读全文
相关推荐













