def lpr_ma_data(year=None):
 year = (du.get_year() if (year is None) else year)
 lab = ct.SHIBOR_TYPE['LPR_Tendency']
 lab = (lab.encode('utf-8') if ct.PY3 else lab)
 try:
  df = pd.read_excel((ct.SHIBOR_DATA_URL % (ct.P_TYPE['http'], ct.DOMAINS['shibor'], ct.PAGES['dw'], 'LPR_Tendency', year, lab, year)), skiprows=[0])
  df.columns = ct.LPR_MA_COLS
  df['date'] = df['date'].map((lambda x: x.date()))
  df['date'] = df['date'].astype(np.datetime64)
  return df
 except:
  return None

def lpr_ma_data ( year = None ) : year = ( du . get_year ( ) if ( year is None ) else year ) lab = ct . SHIBOR_TYPE [ 'LPR_Tendency' ] lab = ( lab . encode ( 'utf-8' ) if ct . PY3 else lab ) try : df = pd . read_excel ( ( ct . SHIBOR_DATA_URL % ( ct . P_TYPE [ 'http' ] , ct . DOMAINS [ 'shibor' ] , ct . PAGES [ 'dw' ] , 'LPR_Tendency' , year , lab , year ) ) , skiprows = [ 0 ] ) df . columns = ct . LPR_MA_COLS df [ 'date' ] = df [ 'date' ] . map ( ( lambda x : x . date ( ) ) ) df [ 'date' ] = df [ 'date' ] . astype ( np . datetime64 ) return df except : return None
parameters year:年份 return date:日期 1y_5:5日均值 1y_10:10日均值 1y_20:20日均值 .