如何在 Pandas 中加载示例数据集
此代码在 Pandas 中加载示例数据集,但需要互联网连接:
iris-example.py
import pandas as pd
iris = pd.read_csv('https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv')这是 iris 数据集的样子:

有关如何导入示例数据集的其他选项的更详细答案,请参见此 StackOverflow 帖子。
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow