随笔分类 -  python 数据分析

摘要:第三版 阅读全文
posted @ 2019-04-23 13:53 Erick-LONG 阅读(1031) 评论(0) 推荐(0)
摘要:from gevent import monkey monkey.patch_all() import gevent from haishoku.haishoku import Haishoku import math from colorsys import rgb_to_hsv import os from collections import OrderedDict import pan... 阅读全文
posted @ 2018-08-08 20:19 Erick-LONG 阅读(1056) 评论(0) 推荐(0)
摘要:import jieba from collections import Counter from wordcloud import WordCloud import matplotlib.pyplot as plt from PIL import Image import numpy as np import jieba.analyse from pyquery import PyQuery ... 阅读全文
posted @ 2018-07-31 14:21 Erick-LONG 阅读(9663) 评论(0) 推荐(1)
摘要:上四分位数 quantile(0.75)下四分位数间距= 上四分位数-下四分位数k =1.5 形变 原始数据 < 上四分位数 + k *间距 异常值 原始数据 > 下四分位数 - k *间距 isnull()空置均值标准差均值最大最小值偏度 skew()峰度系数 kurt() 次数 value_co 阅读全文
posted @ 2018-05-15 19:18 Erick-LONG 阅读(151) 评论(0) 推荐(0)
摘要:import networkx as nx import pylab import numpy as np #自定义网络 row=np.array([0,0,0,1,2,3,6]) col=np.array([1,2,3,4,5,6,7]) value=np.array([1,2,1,8,1,3,5]) print('生成一个空的有向图') G=nx.DiGraph() print('为这个... 阅读全文
posted @ 2018-02-24 16:39 Erick-LONG 阅读(220) 评论(0) 推荐(0)
摘要:公式中A(n,m)为排列数公式,C(n,m)为组合数公式。 阅读全文
posted @ 2017-11-14 16:20 Erick-LONG 阅读(739) 评论(0) 推荐(0)
摘要:https://github.com/Erick-LONG/data_analysis/blob/master/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90%20%E9%82%B1.ipynb 阅读全文
posted @ 2017-05-15 14:30 Erick-LONG 阅读(171) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2017-04-19 22:19 Erick-LONG 阅读(175) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2017-04-19 21:21 Erick-LONG 阅读(556) 评论(0) 推荐(0)
摘要: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 = ... 阅读全文
posted @ 2017-04-19 13:56 Erick-LONG 阅读(169) 评论(0) 推荐(0)
摘要:1 #!/usr/bin/env python 2 # -*- coding:utf-8 -*- 3 import matplotlib.pyplot as plt 4 from wordcloud import WordCloud,STOPWORDS,ImageColorGenerator 5 import jieba 6 from scipy.misc import imrea... 阅读全文
posted @ 2017-04-18 21:59 Erick-LONG 阅读(459) 评论(0) 推荐(0)
摘要:1 import string 2 path = 'waldnn' 3 with open(path,'r') as text: 4 words = [raw_word.strip(string.punctuation).lower() for raw_word in text.read().split()] 5 words_index = set(words) 6 co... 阅读全文
posted @ 2017-03-10 19:23 Erick-LONG 阅读(1613) 评论(0) 推荐(0)