unexpected indent是缩进错误:

def get_train_test(test_size=0.95):"""Split Data into train ans test sets."""y = 1*(df.cand_pty_affiliation =='REP')X = df.drop(["cand_pty_affiliation"], axis=1)

改成以下即可

def get_train_test(test_size=0.95):"""Split Data into train ans test sets."""y = 1*(df.cand_pty_affiliation =='REP')X = df.drop(["cand_pty_affiliation"], axis=1)

unexpected indent错误相关推荐

  1. python提示IndentationError: unexpected indent错误

    IndentationError为缩进错误,unexpected indent意外的缩进. 找到缩进错误的地方,进行修改即可. python 是用缩进来写模块.缩进的空白数量是可变的,必须严格执行所有 ...

  2. 【python :编译错误】 IndentationError:unexpected indent(缩进问题)

    转载:python :脚本运行出现语法错误:IndentationError:unexpected indent(缩进问题) 转载:TRACEING [问题]  一个python脚本,本来都运行好好的 ...

  3. Python编译时提示错误IndentationError: unexpected indent

    新手小白刚开始学习Python,尝试想打印一句话,运行时提示 第19行 有个错误 IndentationError: unexpected indent print('a') 如上所示,indenta ...

  4. IndentationError: unexpected indent python

    在CentOS 6.3 64bit上一个没有配置好的vim中,修改了一个python脚本,运行时就反复报错,说 IndentationError: unexpected indent python 怎 ...

  5. TensorFlow 运行官方文档中文版 简单例子出现:IndentationError:unexpected indent

    例如 >>>  a = tf.constant(10) File "<stdin>", line 1     a = tf.constant(10) ...

  6. Python:IndentationError: unexpected indent

    python遇到错误:IndentationError: unexpected indent解决办法:python因为是根据格式缩进来识别逻辑块的,所以对格式要求极为严格,出现上述错误,一般都是tab ...

  7. IndentationError: expected an indented block --python报错 or IndentationError:unexpected indent

    https://blog.csdn.net/hanhanwanghaha宝藏女孩 欢迎您的关注! 欢迎关注微信公众号:宝藏女孩的成长日记 让这个可爱的宝藏女孩在努力的道路上与你一起同行! 如有转载,请 ...

  8. python:IndentationError: unexpected indent 问题解决 图文说明

    转自:https://www.cnblogs.com/gary-bao/p/5142102.html Python脚本运行出现语法错误:IndentationError:unexpected inde ...

  9. Python中报错:IndentationError: unexpected indent的原因分析和解决方法

    Python中报错:"IndentationError: unexpected indent"的原因分析和解决方法 "IndentationError: unexpect ...

  10. python IndentationError: unexpected indent

    1 问题描述 程序运行时候出现:IndentationError: unexpected indent报错. 2 解决方案--缩进问题 python对缩进要求异常的严格,比如你删除了某一个语句,或者往 ...

最新文章

  1. IT行业常见职位职业路线图
  2. python随机生成模块的应用
  3. 代码管理工具 Git
  4. .net平台是什么?.net平台的组成,.net平台的好处
  5. C++ 实现带权有向图的每对顶点之间的最短路径Floyd算法(完整代码)
  6. Oracle自动性能统计
  7. ABAP中的F4帮助怎么用
  8. 经典算法大全之河内之塔
  9. 想要成为架构师?先看看这些条件满不满足!
  10. Python之路(第三篇) 模块
  11. 微信占用空间太大,删除又担心工作相关聊天记录,有啥好办法没?
  12. java读取dbf数据类型,读取foxpro格式的dbf文件-JSP教程,Java技巧及代码
  13. mysql 触发器 insert new_mysql触发器实例 插入前更新数据
  14. 互联网架构模板,“平台技术”
  15. php1050r210,parkerPARKESL parker维修PARKEROP-ETCATparker油管PARKESLV压力传感器
  16. PHP中获取字符串的长度
  17. 【数据结构】- 教你一步完美应对面试官让你10分钟内实现带头双向循环链表(下)
  18. 成都python数据分析师职业技能_合格大数据分析师应该具备的技能
  19. y yun m_yun是y---un 组成 ,还是y----ün组成
  20. java导入excel组件_三十五、Java中常见解析Excel引入的XXE组件复现与分析

热门文章

  1. ps命令-显示Linux进程信息
  2. window 脚本文件.bat获取最高权限拷贝文件及c++调用.bat文件示例
  3. 楼市调控不断升级,房产中介还能翻身吗?
  4. 域用户本地管理员密码破解
  5. python制作脑图_使用Python将xmind脑图转成excel用例(一)
  6. 禁用Google英文翻译功能
  7. 2021年中国人工智能市场发展现状
  8. L298N电机驱动器
  9. 文件的文件名翻译重命名技巧操作
  10. 新萝卜家园 Ghost XP SP3 电脑城装机版 2011.06+