随笔分类 -  Python

摘要:转:原文链接:https://blog.csdn.net/cadi2011/article/details/84638659 结论argv[0]代表模块文件名、argv[1]代表传入的第一个命令行参数 详解:argv是sys模块的一个全局变量,也称sys模块的一个属性!argv本身为一个list类型 阅读全文
posted @ 2021-10-14 10:41 lzq的小窝 阅读(829) 评论(0) 推荐(0)
摘要:问题原因在于在tf2下调用了tf1的API,而tf2中是没有placeholder的。 解决方法: 使用: import tensorflow.compat.v1 as tftf.disable_v2_behavior() 替换: import tensorflow as tf 阅读全文
posted @ 2021-08-09 08:54 lzq的小窝 阅读(812) 评论(0) 推荐(0)
摘要:一 判断字符串是否为字母或数字 str_1 = "123456“str_2 = "Abc"str_3 = "123Abc" #用isdigit函数判断是否数字print(str_1.isdigit())Tureprint(str_2.isdigit())Falseprint(str_3.isdigi 阅读全文
posted @ 2020-07-09 16:01 lzq的小窝 阅读(228) 评论(0) 推荐(0)
摘要:转自:https://blog.csdn.net/weixin_38128649/article/details/85223752 python 把一个数组arr按照指定的数组大小size分割成若干个数组块这里的运行结果,我是以分割2个数组块的。def arr_size(arr,size): s=[ 阅读全文
posted @ 2020-06-26 12:35 lzq的小窝 阅读(1334) 评论(0) 推荐(0)
摘要:在读取桌面文件的时候一直报错:(unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape 一开始写的: xlsx = pd.ExcelFile('C:\Us 阅读全文
posted @ 2020-05-20 11:29 lzq的小窝 阅读(488) 评论(0) 推荐(0)