会员
周边
新闻
博问
闪存
众包
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
faithtwo
博客园
首页
新随笔
联系
管理
订阅
10 2021 档案
Python常见错误:ValueError: If using all scalar values, you must pass an index(四种解决方案)
摘要:经常遇到问题 ValueError: If using all scalar values, you must pass an index,因为pandas 的dataframe需要一个可迭代的对象 换成列表 或者加个index就可以解决这个问题 作者:KavinDotG链接:https://www
阅读全文
posted @
2021-10-25 19:09
faithtwo
阅读(3349)
评论(0)
推荐(0)
python处理文件操作
摘要:python中有很多内置函数,再遇到一个需求时候,优先考虑内置函数。内置函数使用的时候不需要导入命名空间 range():生成一个从0到某个数的数字列表 2从文件读取数据 2.1文件输出 python中的基本机制是基于行的,程序从文本文件读入数据,一次取到一个数据行 the_file = open(
阅读全文
posted @
2021-10-22 17:51
faithtwo
阅读(150)
评论(0)
推荐(0)
python常用函数
摘要:numpy.unique numpy.unique 函数用于去除数组中的重复元素 data['date_parsed'] = pd.to_datetime(data['Date'], infer_datetime_format=True) data['date_parsed'] = pd.to_da
阅读全文
posted @
2021-10-22 17:50
faithtwo
阅读(64)
评论(0)
推荐(0)
Pandas 数据结构 - DataFrame 案列
摘要:import pandas as pddata = { "mango": [420, 380, 390], "apple": [50, 40, 45], "pear": [1, 2, 3], "banana": [23, 45,56]}df = pd.DataFrame(data)print(df)
阅读全文
posted @
2021-10-21 16:37
faithtwo
阅读(56)
评论(0)
推荐(0)
十大经典预测算法
摘要:十大经典预测算法(一) 线性回归 十大经典预测算法(二) 逻辑回归 十大经典预测算法(四) 支持向量机(SVM算法) 十大经典预测算法(六) 集成学习(模型融合算法) 十大经典预测算法(七) 随机森林 十大经典预测算法(八) ADBOOST 十大经典预测算法(九) GBDT 1. 线性回归 在统计学
阅读全文
posted @
2021-10-19 18:53
faithtwo
阅读(33800)
评论(0)
推荐(0)
公告