共 7 篇文章 |
|
WindChart库中图形种类丰富,包含K线图,饼图,热力图,线型图,雷达图,关系图,日历图,堆叠条形图,每日回撤和净值组合图。30.36 1chart = WLine(title=''''''''机器人:业务营收占比变化情况分析'''''''',subtitle=code,data=all_data_df)五、雷达图?yoy_df为输入数据集... 阅107 转0 评0 公众公开 18-02-12 08:57 |
Matplotlib?我将在这篇文章中介绍matplotlib API的核心对象,并介绍如何使用这些对象来实现绘图。matplotlib有一套完全仿照MATLAB的函数形式的绘图接口,在matplotlib.pyplot模块中。pyplot as plt1''''''''''''''''''''''''1import numpy a... 阅51 转0 评0 公众公开 18-02-12 08:56 |
Sklean库?sklearn是机器学习中一个常用的python第三方模块,是进行数据挖掘和分析的便捷高效工具。三、回归?3.1 普通线性回归?3.2 正则化路径——Lasso和Elastic Net回归?3.1 普通线性回归?1from sklearn import datasets, linear_model1# Load the diabetes dataset系数估计: 938.237861251均方误差: 2548.07拟合优度: 0.471plt.style.use(... 阅147 转0 评0 公众公开 18-02-12 08:56 |
检验两个独立的样本对应总体的均值是否存在显著的差异1from scipy.stats import norm1n1 = norm(loc=0.3, scale=1.0)1x = np.linspace(-3,3,100)1from scipy.stats import ttest_ind #导入y检验模块t = 2.1579961596973902p-value = 0.0321320234997519--------------------两总体均值存在显著差异四、聚类分析—cluster?1import scipy.一般地... 阅135 转0 评0 公众公开 18-02-12 08:55 |
小数位数控制和取整1b = np.array([1.12312,2.12313,1.1100])[ 1.12312 2.12313 1.11 ]小数位数: [ 1.12 2.12 1.11]1x = np.random.randn(5)原数组: [-0.44301833 -0.12900231 -0.42061772 0.28445053 0.46076555]向上取整: [-1. -1. -1. 0. 0.]向下取整: [-0. -0. -0. 1. 1.]四舍五入(控制小数为2位): [-0.44 -0.13 -0.42 0.28 0.46]数组... 阅95 转0 评0 公众公开 18-02-12 08:55 |
下面介绍了三个函数来实现数据框的拼接功能——concat函数,merge函数和join函数2.7.1 数据框拼接—pd.concat?1data1 = pd.DataFrame(np.random.randn(4,3),index=[''''''''a'''''''',''''''''b'''''''',... 阅125 转0 评0 公众公开 18-02-12 08:55 |
函数基本框架如下(【】中的内容表示是或选的,可以不写):def 函数名(参数): 【''''''''''''''''''''''''函数说明文档'''''''''''''''''''''&... 阅50 转0 评0 公众公开 18-02-12 08:54 |