#encoding=utf-8 import pandas as pd import os import csv def concat_csv(filename,dirpath): with open(filename,'w') as f: cw=csv.writer(f) cw.writerow( ...
分类:
其他好文 时间:
2021-06-09 15:30:20
阅读次数:
0
test_data = pd.read_csv('news_data.csv', encoding='utf8',header=None) test_data.columns=['id','content'] print(test_data) 主要就是header=None 以及columns ...
分类:
其他好文 时间:
2021-06-08 22:50:08
阅读次数:
0
一、打开文件 open(path,flag,encoding,[errors]) path:打开路径 flag:打开方式:【读r(read),写w(write),追加a(append)】 encoding:编码方式 errors:错误处理 二、详解flag r:只读。该文件必须已存在。 r+:可读可 ...
分类:
编程语言 时间:
2021-06-07 21:09:28
阅读次数:
0
Ncurses(三)- 使用颜色 检查颜色可用 在使用颜色之前,你需要知道你的终端是否支持颜色显示,你可以通过以下if检测: if (has_colors() == FALSE) { endwin(); printf("Your terminal does not support color\n") ...
分类:
其他好文 时间:
2021-06-06 19:23:46
阅读次数:
0
import configparser<!--more-->cf = configparser.ConfigParser()cf.read("config.ini", encoding='UTF-8')username=cf.get("user","username") auto=cf.get("a ...
分类:
编程语言 时间:
2021-06-06 19:16:51
阅读次数:
0
0x01--新发地菜价 #!/usr/local/bin/python3.6 # -*- encoding=utf-8 -*- """ @coder: diygou @since: 2021/6/5下午6:33 """ import requests from bs4 import Beautifu ...
分类:
其他好文 时间:
2021-06-06 18:49:24
阅读次数:
0
# -*- coding: utf-8 -*- import urllib import urllib2 import re import json import xlwt import time workbook = xlwt.Workbook(encoding='utf-8') #新建一个Exc ...
分类:
其他好文 时间:
2021-06-05 18:28:32
阅读次数:
0
1.理解 操作数据库的sql语句需要封装到一个对象中,由这个对象带到数据库中去实现,而java为我们提供了两个接口来实现封装sql语句; ①Statement接口,它存在问题,需要拼写sql语句,而且它存在sql注入问题(列如:用户名,密码不对也可以访问数据库)在此就不细讲; ②PrepareSta ...
分类:
数据库 时间:
2021-06-05 18:18:51
阅读次数:
0
save.py def savetofile(memberlist, avgfee): with open('record.txt','a',encoding='utf8') as f: recordlist = [f'{member}:{avgfee}' for member in memberl ...
分类:
编程语言 时间:
2021-06-04 19:37:30
阅读次数:
0
ssm实现qq邮箱发送验证码 导入maven依赖 <!--邮箱验证码--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>5.1 ...
分类:
其他好文 时间:
2021-06-04 19:09:34
阅读次数:
0