python
文章平均质量分 68
weathersearcher
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
excel区域省份匹配
import pandas as pddata = pd.read_excel(“售后问题.xlsx”, sheet_name=“Sheet1”)data2 = pd.read_excel(“storemapping.xlsx”, sheet_name=“Sheet1”)data.to_dict(){‘店面编号’: {0: ‘t001’, 1: ‘t002’}, ‘问题描述’: {0...原创 2018-09-30 22:11:24 · 4107 阅读 · 0 评论 -
查天气
查天气import requests,jsonfrom city import citycityname=input(‘你想查看哪个城市的天气?\n’)你想查看哪个城市的天气?大连citycode=city.get(cityname)if citycode:url = ‘http://www.weather.com.cn/data/cityinfo/%s.html’ ...原创 2018-09-30 21:56:10 · 289 阅读 · 0 评论 -
豆瓣爬热门电影
import requests,sys,webbrowser,bs4,pprint,openpyxlres=requests.get(‘https://movie.douban.com/chart’)soup =bs4.BeautifulSoup(res.text,“html.parser”)elemts=soup.select(’.nbg’)moviename=[]for i in r...原创 2018-09-30 22:08:58 · 240 阅读 · 0 评论 -
wechat好友分类
import itchatitchat.auto_login(True)Please press confirm on your phone.Loading the contact, this may take a little while.Login successfully as astroitchat.search_friends(name=‘astro’)[&...原创 2018-09-30 22:15:08 · 443 阅读 · 0 评论 -
Python中元组,列表,字典的区别
1.列表list是处理一组有序项目的数据结构。列表中的项目包括在方括号中,可以添加,删除,或者是搜索列表中的项目。由于你可以增加或删除项目,列表是可变的数据类型,即这种类型是可以被改变的,并且列表是可以嵌套的。实例:#coding=utf-8animalslist=[‘fox’,‘tiger’,‘rabbit’,‘snake’]print “I don’t like these”,len...转载 2018-10-07 22:31:18 · 341 阅读 · 0 评论
分享