1. 설치
pip 설치 팬더
오류가 발생하여 실행할 수 없는 경우 설치하시면 됩니다.
핍 설치 xlrd
2. 코드는 다음과 같습니다
팬더를 PD로 가져오기 가져오기 시간,날짜/시간 file_path = r'C:\Users\Administrator\Desktop\번호 이식성 테스트\admin_log.xls' df = pd.read_excel(file_path, sheet_name = "admin",header=None) # 인쇄(df.values[1,0]) 데이터=[] 범위(len(df)) 내의 i에 대해: timechuo = df.values[i,0] time_local = time.localtime(timechuo) dt = time.strftime("%Y-%m", time_local) 데이터.추가(dt) 결과 = pd.value_counts(데이터) 인쇄(결과)