![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
鲤小柒
这个作者很懒,什么都没留下…
展开
-
SQL语句
SQL语句文件夹(库)文件(表)文件内容(记录)库增 create database db1 charest utf8;删 drop database db1;改 alter database db1 charest gbk;查 show create database db1;或show databases;表增 create table t1 (id int,name char);删 drop table t1;改 alter table t1 modify原创 2021-03-08 21:09:53 · 110 阅读 · 0 评论 -
爬虫猫眼前100电影名称
爬虫代码#加载库import requestsfrom bs4 import BeautifulSoupfor i in range(0,10): url = 'https://maoyan.com/board/4?requestCode=36d10a7cd28350b70e3d162c109c9cdfz7rmd&offset=' + str(i) #请求头 headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0;原创 2021-01-11 18:32:18 · 252 阅读 · 0 评论 -
python字典保存csv
将字典数据保存到csv文件内csv格式 with open('data.csv', 'a+', encoding = 'utf-8', newline ="") as f: header = ['**', '**',] #csvfile.write(u'中文') writer = csv.DictWriter(f,fieldnames=header) writer.writeheader() writer.write原创 2021-01-05 12:45:33 · 731 阅读 · 0 评论