摘要:
接上节: 3、梯度(gradient): def numerical_gradient(f,x): h=1e-5 grad=np.zeros_like(x) for index_x in range(x.size): tmp=x[index_x] x[index_x]=tmp+h fxh1=f(x) 阅读全文
摘要:
import resquests #import urllib.request from bs4 import BeautifulSoup from collections import OrderedDict import pandas as pd import numpy as np impor 阅读全文
摘要:
一、基本定义 class cl(object): def __init(self,var) self.var=var def func(self,i) print('%s is in %s'%(i,self.var)) c=cl(var)#实例化 c.var#属性 c.func()#方法 type( 阅读全文
摘要:
1、Pandas库的读取操作 from pandas import read_excel dr=read_excel(filename,header) dr#dataframe数据 dw=DataFrams(data=dict,columns=dict.keys()) dw.to_excel(fil 阅读全文