xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 1KB
    文件類型: .py
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-12
  • 語言: Python
  • 標簽: python??日期轉換??

資源簡介

實現將年月日數據轉為天數,并區別閏年,并保存為csv輸出

資源截圖

代碼片段和文件信息

#?-*-?coding:?utf-8?-*-
“““
Created?on?Thu?Jun??6?16:59:15?2019

@author:?Administrator
“““
import?os
import?pandas?as?pd
import?numpy?as?np
#result?=pd.Dataframe(np.array([1]).reshape(11)columns=(‘id‘))
def?leap_year(year):
????return??(year//4==0?and?year//100!=0)?or?(year?//400==0)
def?which_day(yearmonthday):
????total=0
????days_of_month=[312831303130313130313031]
????for?index?in?range?(month-1):
????????????total?+=?days_of_month[index]
????if?month?>2?and?leap_year(year):
????????total?+=?1
????return?total?+?day
if?__name__?==?‘__main__‘:
????path=r‘C:\Users\Administrator\De

評論

共有 條評論