본문 바로가기
반응형

코딩53

[업무 자동화] 파이썬 UI를 통해 엑셀에 기록하는 프로그램 import xlwings as xw # Excel 파일 열기 wb = xw.Book('파일경로/파일이름.xlsx') # 원하는 시트 선택 sheet = wb.sheets['시트이름'] # 수식 적용할 셀 범위 지정 cell_range = sheet.range('A1:A10') # 수식 입력 formula = '=SUM(B1:B10)' # 예시로 SUM 함수 적용 cell_range.formula = formula # 변경된 내용 저장 wb.save() # Excel 종료 wb.close()​ from tkinter import * categories = { "대분류1": { "중분류1": ["소분류1", "소분류2", "소분류3"], "중분류2": ["소분류4", "소분류5", "소분류6"], "중분류.. 2023. 6. 21.
tkinter 라이브러리를 이용하여 간단한 계산기 프로그램 만들기 from tkinter import * a='' def cal(value): global a a+=str(value) entry1.delete(0, END) entry1.insert (0, a) def clear(): global a a='' entry1.delete(0, END) def result(): global a entry1.delete(0, END) entry1.insert (0, eval(a)) window=Tk() window.title("계산기") entry1 = Entry(window, width=31, bg ="yellow") entry1.grid(row=0, column=0, columnspan=5) Button(window, width=5, text='7', command=lamb.. 2023. 5. 2.
[python] OpenCV medianBlur() 'Assertion failed' 오류 해결 방법 OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\median_blur.dispatch.cpp:285: error: (-215:Assertion failed) (ksize % 2 == 1) && (_src0.dims() 2022. 9. 14.
[파이썬] 파이썬 하위 폴더의 파일에서 클래스 import 하는 방법 https://freedata.tistory.com/70 [python] 다른 폴더 파일 import 파이썬 상위 하위 폴더에 있는 파일 import 하기 파이썬에는 패키지 import 말고 내가 만든 파일을 불러 올 수 있다. 가끔 사용하면 종종 헷갈리는데 이번에 확실하게 익혀보자. from import 차이 같은 freedata.tistory.com http://oniondev.egloos.com/9753808 [Python 파이썬] from 과 import 사용법 import : transfer (data) into a file or document import라는 것은 특정 데이터를 파일이나 문서로 들여오는 것을 말한다. 어느 언어이든지 import는 코드의 가장 상단에 위치하기 때문에, 개발자라.. 2022. 6. 1.
반응형