

지역 두개를 병합하여 새로운 행 추가 import pandas as pddef sum_rows(year, region, df, regions): new_row = ( df.loc[ # 조건 (df['년도'] == year) & (df['시군구'].isin(regions)) # 가져올 열 ][['노인비율', '노인수', '총인구']] .apply(pd.to_numeric, errors='coerce').sum() ) new_row['시군구'] = region new_row['년도'] = year df.drop(selected_rows.index, inplace=True) ..

사용 패키지 설치!pip install dbfread .dbf 파일 불러오기from dbfread import DBFdbf = DBF('파일이름.dbf', encoding='utf-8')for record in dbf: print(record) .csv로 저장하기import pandas as pddata = [record for record in dbf]df = pd.DataFrame(data)df.to_csv('파일이름.csv', index=False, encoding='utf-8')print('csv로 저장 완료~~') 전체 코드!pip install dbfreadimport pandas as pdfrom dbfread import DBFdbf = DBF('파일이름.dbf', encoding=..

모든 csv 결합import pandas as pdimport glob# 합칠 CSV 파일이 있는 폴더 경로folder_path = './데이터폴더/*.csv'# 모든 CSV 파일을 읽어 리스트에 저장csv_files = glob.glob(folder_path)# 각 CSV 파일을 읽어서 리스트에 추가dataframes = [pd.read_csv(file) for file in csv_files]# 리스트의 모든 데이터프레임을 한 번에 합치기combined_df = pd.concat(dataframes, ignore_index=True)# 합쳐진 데이터프레임을 새로운 CSV 파일로 저장combined_df.to_csv('파일이름.csv', index=False)print('CSV 파일이 성공적으로 합쳐졌..

글 , 페이지 article_rep_date : 날짜/시간 (yyyy. m. d. HH:MM)article_rep_simple_date : 날짜만 (yyyy. m. d.)article_rep_date_year : 세부시간 - 연도 (yyyy)article_rep_date_month : 세부시간 - 월 (mm)article_rep_date_day : 세부시간 - 일 (dd)article_rep_date_hour : 세부시간 - 시 (HH)article_rep_date_minute : 세부시간 - 분 (MM)article_rep_date_second : 세부시간 - 초 (SS) 공지 notice_rep_date : 날짜/시간 (yyyy.mm.dd HH:MM)notice_rep_simple_date : 날짜 ..

HTML위를 아래와 같게 수정// 목차 생성 $(document).ready(function() { $("#toc").toc({content: ".tt_article_useless_p_margin", headings: "h2,h3"}); });// 목차 생성 $(document).ready(function() { $("#toc").toc({content: ".tt_article_useless_p_margin", headings: "h2,h3,h4,h5"}); }); { "pl-0": heading.tagName === "H2", "pl-4": heading.tagName === "H3" } { "pl-0": heading.tagName === "H2", "pl-4": h..

마우스 모양* {cursor: url(https://cur.cursors-4u.net/cursors/cur-11/cur1054.cur), auto !important;} 클릭시 파동 효과 HTML - 위에 복사/*마우스 클릭 효과*/div.clickEffect{ position:fixed; box-sizing:border-box; border-style:solid; border-color:#828282; border-radius:50%; animation:clickEffect 0.8s ease-out; z-index:5;}@keyframes clickEffect{ 0%{ opacity:1; width:0.5em; height:0.5em; margin:-0.25em; border-width:0.3..

.manage-menu { display: none; /* 기본적으로 숨김 */ flex-direction: row; /* 가로 배치로 설정 */ justify-content: flex-start; /* 왼쪽 정렬 */ gap: 50px; /* 요소들 사이 간격 */ padding-left: 40px; /* 오른쪽으로 약간 이동 */}.manage-menu.visible { display: flex; /* 클래스 추가 시 보이도록 설정 */}.manage-menu a { text-decoration: none; /* 링크의 밑줄 제거 */ color: #aaa; /* 기본 글자 색상 유지 */ padding: 5px 10px; /* 패딩 추가 */ b..

const COPY_TEXT_CHANGE_OFFSET = 1000;const COPY_BUTTON_TEXT_BEFORE = "Copy";const COPY_BUTTON_TEXT_AFTER = "Copied";const COPY_ERROR_MESSAGE = "ERROR";const copyBlockCode = async (target) => { if (!target) return; try { const code = decodeURI(target.dataset.code); await navigator.clipboard.writeText(code); target.textContent = COPY_BUTTON_TEXT_AFTER; setTimeout(() => { target...