摘要:
ss = [['xx','m',22],['cc','w',33],['jj','w',44],['qq','m',11]] import pandas as pd df = pd.DataFrame(ss) df.columns=['name','gender','age'] phone = pd.Series([21000,18900,18000]) phone = pd.Series... 阅读全文
摘要:
1 #!/usr/bin/env python 2 # -*- coding:utf-8 -*- 3 import requests 4 from bs4 import BeautifulSoup 5 import pandas 6 def gethousedetail(url): 7 info ={} 8 res = requests.get(url) 9 ... 阅读全文
摘要:
1 speech_text='xxx' 2 speech = speech_text.lower().split() 3 dic = {} 4 for word in speech: 5 if word not in dic: 6 dic[word]=1 7 else: 8 dic[word]+=1 9 import operat... 阅读全文
摘要:
import string path = 'waldnn' with open(path,'r') as text: words = [raw_word.strip(string.punctuation).lower() for raw_word in text.read().split()] words_index = set(words) counts_dict = ... 阅读全文
摘要:
1 import requests 2 import json 3 import time 4 url = 'http://weibo.com/aj/message/add?ajwvr=6' 5 headers = { 6 'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, ... 阅读全文
摘要:
1 from selenium import webdriver 2 import time 3 4 driver = webdriver.PhantomJS(executable_path="D:/phantomjs/bin/phantomjs.exe") 5 driver.get("http://study.163.com/course/courseMain.htm?course... 阅读全文
摘要:
1 from email.header import Header 2 from email.mime.text import MIMEText 3 from email.utils import parseaddr,formataddr 4 import smtplib 5 from email.mime.multipart import MIMEMultipart 6 from e... 阅读全文
摘要:
1 # -*- coding:utf-8 -*- 2 import requests 3 import json 4 import re 5 import os 6 import gevent 7 import time 8 import random 9 from multiprocessing.dummy import Pool as ThreadPool 10 from ... 阅读全文