利用python做数据分析
书(代码手敲)
cutwind
白身红尘客/风起水无波/仗剑欲饮酒/看人间不朽
qq:1246467060(加Q备注优快云)
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python|LightGBM模型
# -*- coding: utf-8 -*-"""Created on Fri Jun 12 16:20:17 2020@author: weiping"""import xgboost as xgbimport lightgbm as lgb from sklearn.model_selection import train_test_splitfrom sklearn.metrics import *from sklearn.datasets import load_iri.原创 2020-06-15 15:36:49 · 4223 阅读 · 0 评论 -
利用python进行数据分析matplotlib_api入门
# -*- coding: utf-8 -*-"""Created on Tue Oct 29 09:27:37 2019@author: weiping"""import matplotlib.pyplot as plt import numpy as npimport pandas as pdplt.plot(np.arange(10))plt.show()fig,...原创 2019-10-29 10:54:08 · 266 阅读 · 0 评论 -
利用python进行数据分析pandas_字符串
# -*- coding: utf-8 -*-"""Created on Mon Oct 28 17:30:22 2019@author: weiping"""val = 'a,b , gudd , tt'val.split(',')pp = [x.strip() for x in val.split(',')]pp''' 字符串连接 '''a,b,c,d = pp...原创 2019-10-28 19:14:41 · 266 阅读 · 0 评论 -
利用python进行数据分析pandas_数据转换
# -*- coding: utf-8 -*-"""Created on Mon Oct 28 14:26:56 2019@author: weiping"""import pandas as pdimport numpy as npdf = pd.DataFrame({'k1':['a']*3 + ['b']*4, 'k2':[2,2,...原创 2019-10-28 17:29:31 · 348 阅读 · 0 评论 -
利用python进行数据分析pandas_数据重排
# -*- coding: utf-8 -*-"""Created on Fri Oct 25 16:41:03 2019@author: weiping"""import pandas as pdimport numpy as npdf1 = pd.DataFrame({'name':['a','b','c','d','f','g'], ...原创 2019-10-28 14:13:39 · 595 阅读 · 0 评论 -
利用python进行数据分析pandas_DataFrame1
# -*- coding: utf-8 -*-"""Created on Thu Oct 24 17:03:08 2019@author: weiping"""import pandas as pdimport numpy as npdata = np.array([[1,3,5,7], ['a','b','c','d'], [2001,2002...原创 2019-10-24 20:12:30 · 335 阅读 · 0 评论 -
利用python进行数据分析pandas_Series
# -*- coding: utf-8 -*-"""Created on Thu Oct 24 11:18:32 2019@author: weiping"""import pandas as pd'''Series'''ser = pd.Series([3,5,-6,9])serser.values #series 的数据值ser.index #series的索引...原创 2019-10-24 13:55:52 · 274 阅读 · 0 评论 -
利用python做数据分析--numpy模块
# -*- coding: utf-8 -*-"""Created on Mon Oct 21 09:59:52 2019@author: weiping"""import numpy as np '''一维数组'''data = [3,5,7,9]data*10 ## 结果是复制data10遍 data_n = np.array(data)data_n*10...原创 2019-10-23 16:05:58 · 222 阅读 · 0 评论
分享