#아래의 코드로 구현해서 만든 df데이터 프레임에서 에러 메세지에 Temporary 또는 logfile 또는 close를 포함하는 에러번호와 에러메세지를 출력하시오.
df = df.loc [ df.error_messege.str.contains('Temporary | logfile | CLOSE'), : ] df
error_codeerror_messege0496982119...496497498499500
| ORA-1109 | signalled during: ALTER DATABASE CLOSE NORMAL... |
| ORA-1507 | signalled during: ALTER DATABASE CLOSE NORMAL... |
| ORA-1109 | signalled during: ALTER DATABASE CLOSE NORMAL... |
| ORA-1109 | signalled during: ALTER DATABASE CLOSE NORMAL... |
| ORA-25153 | Temporary Tablespace is Empty |
| ... | ... |
| ORA-25153 | Temporary Tablespace is Empty |
| ORA-25153 | Temporary Tablespace is Empty |
| ORA-25153 | Temporary Tablespace is Empty |
| ORA-25153 | Temporary Tablespace is Empty |
| ORA-25153 | Temporary Tablespace is Empty |
#위의 코드를 구현해서 만든 df 데이터 프레임에서 에러 메세지가 Temporary 또는 logfile 또는 CLOSE 를 포함하는 에러번호를 출력하고 #그 에러번호별 건수를 출력하는데 그 건수가 높은것부터 출력하시오
df = df['error_code'].value_counts().reset_index()
df
| ORA-25153 | 195 |
| ORA-1109 | 4 |
| ORA-1507 | 2 |
| ORA-301 | 2 |
| ORA-322 | 1 |
#오늘의 마지막 문제3. 문제2번에서 출력한 결과인 에러번호와 그 건수로 막대그래프를 그리시오
import matplotlib.pyplot as plt # 그래프 전문 파이썬 모듈 plt.rc('font', family='Malgun Gothic') # 한글 폰트를 지정
plt.figure( figsize=(15,10)) #(가로,세로)
plt.bar(df['error_code'], df['count'], color='indigo', alpha=0.5) # 막대 그래프
plt.title('국민은행 오라클 에러번호 순위') # 그래프 제목