python数据分析--------婚恋配对 为例 蒙特卡罗思想2

大数据行业十分火热,本人认为python是比较强大的分析工具,在网易云课堂上学习了python数据分析。做了案例,写下代码分析过程以及分析结论。
以下是婚恋配对的python数据分析项目。

# -*- coding: utf-8 -*-
"""
Created on Mon Jan  7 15:56:04 2019

@author: Administrator
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import time
import os
import warnings
warnings.filterwarnings("ignore")
from bokeh.plotting import figure,show,output_file
from bokeh.models import ColumnDataSource,HoverTool


sample_m2=create_sample(100,"m")
sample_f2=create_sample(100,"f")
sample_m2['strategy']=np.random.choice([1,2,3],100)


test_m2=sample_m2.copy()
test_f2=sample_f2.copy()
n=1
starttime=time.time()

success_roundn=different_strategy(test_m2,test_f2,n)
match_success2=success_roundn#把每一轮匹配成功的success_roundn 放到match_success2这个空壳子里去

test_m2=test_m2.drop(success_roundn["m"].tolist())
test_f2=test_f2.drop(succes
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值