上一页 1 2 3 4 5 6 7 ··· 19 下一页
摘要: groupby: import random import numpy as np random.seed() df = pd.DataFrame({'data':['a', 'a', 'b', 'b', 'a'], 'num':['one', 'two', 'one', 'two', 'one'] 阅读全文
posted @ 2023-06-09 16:24 半日闲1 阅读(5) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd df = pd.DataFrame([['11.0' ,1,2,3], ['22.0' ,4,5,6], ['33.0' ,7,8,9]], columns = ['a','b','c','d']) df['a'] = pd.to_numeric(df['a' 阅读全文
posted @ 2023-06-01 13:37 半日闲1 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1. 防火墙:服务器上的防火墙可能会阻止端口连接。您需要在防火墙中打开相应的端口。 2. 端口未打开:如果您的服务器没有打开该端口,则客户端无法连接。您需要在服务器上打开相应的端口。 3. ISP阻止:ISP可能会在其网络上阻止某些端口的连接。您需要联系ISP以了解其政策。 4. 路由器配置:如果您 阅读全文
posted @ 2023-04-09 19:48 半日闲1 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 1. `command` 2. $(command) 阅读全文
posted @ 2023-03-04 23:53 半日闲1 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 问题: 没有列名,那么pandas读入时默认按照第一行的格式,前面都是两列,而后面出现了三列,四列,五列数据就会报错。而你直接读入时指定数据列就可以避免这个问题了 其实你还可以把分隔符改成不是,的其他,比如sep='\t',那么就把每行的所有的数据读入一个单元格,后期使用正则化以逗号分割 解决: 0 阅读全文
posted @ 2023-01-31 17:13 半日闲1 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 问题:安装完包无法导入 安装出现: [root@a928bac91186 project]# pip install django==2.2Requirement already satisfied: django==2.2 in /usr/local/lib/python3.6/site-pack 阅读全文
posted @ 2023-01-10 09:12 半日闲1 阅读(639) 评论(0) 推荐(0) 编辑
摘要: 问题:yum install -y msodbcsql18 安装到最后必须手动输入yes 解决:ACCEPT_EULA=Y yum install -y msodbcsql18 ACCEPT_EULA=Y 表示接受最终用户许可协议,否则无法安装成功。 阅读全文
posted @ 2022-12-22 23:35 半日闲1 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 报错:'bool' object is not callable 原因:is_authenticated是属性而不是方法 解决:把括号去掉就可以了 demo: class A(): def __init__(self, x): self.x = x def add(self): return 3 a 阅读全文
posted @ 2022-12-14 23:13 半日闲1 阅读(835) 评论(0) 推荐(0) 编辑
摘要: 问题: python manage.py createsuperuser 无法创建超级用户 报错:django.db.utils.DataError: (1406, "Data too long for column 'password' at row 1") 问题原因:用户模型继承 Abstrac 阅读全文
posted @ 2022-12-14 15:25 半日闲1 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 报错:Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist 原因: CentOS 已经停止维护的问题 官方:https:// 阅读全文
posted @ 2022-08-17 23:11 半日闲1 阅读(1033) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 19 下一页