python - 绘制变量之间的关系 - Python
问题描述
titanic
我正在尝试在经典数据的变量之间创建成对散点图,特别是train.csv
. 这是代码:
#scatterplot
sns.set()
sns.pairplot(df, dropna=True)
plt.show()
但它向我显示以下错误:
ValueError: max must be larger than min in range parameter.
解决方案
您的数据框中可能有 NaN。这是您在尝试使用包含 NaN 的数组创建散点图和直方图时会看到的错误。
推荐阅读
- bootstrap-4 - 左右控件在轮播Bootstrap 4.1中不起作用
- scipy - 在具有测量误差的样条数据上使用 scipy quad 时如何传播误差?
- java - XML 上的 XPath 应用程序返回空字符串
- ios - 在从 UIScrollView 继承的自定义滚动视图中使用 contentMode 属性是否有任何副作用?
- python - 重定向导致找不到页面错误
- django - Django createsuperuser 创建了密码错误的管理员帐户
- react-native - 在 React Native 中使用国际字符
- tensorflow - Tensorflow Eager:存储和恢复可训练变量
- scala - 如何为其他列创建一系列事件(列值)?
- java - Java 模棱两可的方法名称,尽管参数类型不同