import requests# 引用requests库from bs4 import BeautifulSoup# 引用BeautifulSoup库res_foods = requests.get('http://www.xiachufang.com/explore/')# 获取数据bs_food ...
分类:
Web程序 时间:
2019-03-21 10:23:42
阅读次数:
454
pandas part I: # 总结: DataFrame.loc[0:5] 一共6行数据,而切片[0:5]只有5个数据 在对df的行数据删除后,有些index已缺失,此时用 iloc[]来按照位置索引 取指定行 food_info.loc[[2,5,10]],传入list 取指定列 zinc_c ...
分类:
其他好文 时间:
2019-03-15 14:27:04
阅读次数:
176
pandas主要为数据预处理 DataFrame import pandas food_info = pandas.read_csv("路径") #绝对路径和相对路径都可以 type(food_info)为DataFrame food_info.dtype_ #文件中数据的类型 food_info. ...
分类:
编程语言 时间:
2019-03-06 19:32:35
阅读次数:
273
js中有三个改变this指针的方法,分别是 apply,call,bind。很多人只知道能改变的this,但是具体的适用场景不是太清楚。我也是遇到坑后不断的实践发现了区别。 call ,apply方法: 在Food类中,因为使用了call改变类Product的类的this执向。所以这个时候在Prod ...
分类:
移动开发 时间:
2019-03-03 12:18:32
阅读次数:
208
以上是标准程序,只用了155ms,而下面的我的代码用了904ms。差距还是很大的,仔细看,发现是细节的优化。 ...
分类:
其他好文 时间:
2019-02-13 12:25:49
阅读次数:
108
代码 vue数据是异步加载的,此时this.food.ratings还没有加载 可以加个判断 ok ...
分类:
其他好文 时间:
2019-02-08 14:27:16
阅读次数:
193
【链接】 "我是链接,点我呀:)" 【题意】 给你n个菜以及每个人需要的菜以及数量 如果某个人无法满足它对菜的需求的话 就用价格比较低的菜来填充它的要求。 (如果价格低的菜不够了,那么就直接输出0) 否则输出每个人的消费总量 【题解】 把所有的菜按照价格升序排序. 对于每一个顾客的kind,num ...
分类:
其他好文 时间:
2019-02-04 10:27:53
阅读次数:
252
#include//标记数组法,在结构体外面开一个数组来标记这个元素是否被取完,对结构体排序,遍历结构体时如果标记数组为0跳过就好 using namespace std; typedef long long ll; struct student{ int index; int c; int r; ... ...
分类:
其他好文 时间:
2019-02-02 10:45:36
阅读次数:
173
听说你也喜欢吃培根?那我们一起来欣赏一段培根的介绍吧: bacoN is one of aMerICa'S sWEethEartS. it's A dARlinG, SuCCulEnt fOoD tHAt PaIRs FlawLE 什么,不知道要干什么?上面这段巨丑无比的文字,为什么会有大小写呢?你 ...
分类:
编程语言 时间:
2019-01-30 15:48:26
阅读次数:
359
Description Hot dog is a very delicious food,and Goc like it very much. The picture below shows how much does Goc like it. hhhhh... Given a set of hot ...
分类:
其他好文 时间:
2019-01-27 14:35:43
阅读次数:
173