摘要:国内源: 新版ubuntu要求使用https源,要注意。 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.e
阅读全文
随笔分类 - python
摘要:国内源: 新版ubuntu要求使用https源,要注意。 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.e
阅读全文
摘要:PHP: <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $out=exec('python ../python/test.py var1 var2 v
阅读全文
摘要:最新实例: # coding:utf-8 from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.exc import SQLAlchemyError engine=cr
阅读全文
摘要:import pandas as pd df = pd.DataFrame({'性别' : ['男', '女', '男', '女', '男', '女', '男', '男'], '成绩' : ['优秀', '优秀', '及格', '差', '及格', '及格', '优秀', '差'], '年龄'
阅读全文
摘要:import pandas as pd import random import numpy as np import os # # data = [10, 20, 30, 40, 50, 60] # df = pd.DataFrame({'Heading': data, # 'Longer hea
阅读全文
摘要:import datetime def PowerSetsBinary(items):#1,二进制方法 N = len(items) # generate all combination of N items # enumerate the 2**N possible combinations re
阅读全文
摘要:不多说看代码: import pandas as pd import numpy as np df = pd.DataFrame(np.random.randn(5,4)) df1 = pd.DataFrame(np.random.randn(3,4)) df2 = pd.DataFrame(np.
阅读全文
摘要:import pandas as pd data = {"number":[1,1,np.nan,np.nan,2,2,1,2,2], "letter":['a','b',np.nan,np.nan,'c','d','b','c','d'], "label":[1,1,9,9,2,2,1,2,2],
阅读全文
|