r - 如何解决“无效的'休息'数量”
问题描述
我需要帮助来解决此错误。我正在尝试创建 df_custdata 文件的直方图,然后提取一个数字列并将其放入自己的直方图中。
代码:
df_custdata <- gsub(".", "", df_custdata)
df_custdata <- as.numeric(df_custdata)
hist(df_custdata)
错误: hist.default(f_custdata) 中的错误:“中断”数无效
解决方案
在 Python 中,缩进非常重要,冒号也是如此。
为此,您还需要使用 if 语句而不是 for 循环。
此代码有效,
age = int(input("Enter You Age:"))
if age in range (14,18):
print ("This student is in Highschool")
else:
print ("This student is not in Highschool")
推荐阅读
- python - 使用 Python + Selenium 进行基于 Electron 的应用程序测试
- python - 无法从自刷新 websocket 端点获取 pagesource/DOM
- android - RecyclerView 不显示来自 firebase (Kotlin) 的数据
- android - 如何修复“所有单击的 Listview 项目都可以使用相同的数据”
- reactjs - 如何以 root 身份使用 create-react-app 更新自定义 GitHub 页面
- php - 将裁剪后的图像上传到数据库
- sql - 根据相似值获取数据
- automation - 人工智能决定我需要多少台机器来节省云成本
- python-2.7 - ImportError:没有名为 [目录] Google App Engine 的模块
- pepper - 如何让辣椒机器人编排应用程序出现在平板电脑上以启动它?