IT/인터넷 마케팅2021. 2. 24. 21:29
반응형

python 엑셀 자동화 [업무자동화]

 

xlsxwriter 와 pandas 를 활용한 엑셀 업무 자동화

pandas 설치

pip install pandas

 

import pandas as pd
import numpy as np

# Sample DataFrame
df = pd.DataFrame(np.random.randn(5, 4), columns=['one', 'two', 'three', 'four'],
                  index=['a', 'b', 'c', 'd', 'e'])

# Dump Pandas DataFrame to Excel sheet
writer = pd.ExcelWriter('myreport.xlsx', engine='xlsxwriter')
df.to_excel(writer, sheet_name='Sheet1', startrow=2)

# Get book and sheet objects for futher manipulation below
book = writer.book
sheet = writer.sheets['Sheet1']

# Title
bold = book.add_format({'bold': True, 'size': 24})
sheet.write('A1', 'My Report', bold)

# Color negative values in the DataFrame in red
format1 = book.add_format({'font_color': '#E93423'})
sheet.conditional_format('B4:E8', {'type': 'cell', 'criteria': '<=', 'value': 0, 'format': format1})

# Chart
chart = book.add_chart({'type': 'column'})
chart.add_series({'values': '=Sheet1!B4:B8', 'name': '=Sheet1!B3', 'categories': '=Sheet1!$A$4:$A$8'})
chart.add_series({'values': '=Sheet1!C4:C8', 'name': '=Sheet1!C3'})
chart.add_series({'values': '=Sheet1!D4:D8', 'name': '=Sheet1!D3'})
chart.add_series({'values': '=Sheet1!E4:E8', 'name': '=Sheet1!E3'})
sheet.insert_chart('A10', chart)

writer.save()

 

반응형
Posted by Dream Come True
IT/인터넷 마케팅2020. 12. 17. 22:18
반응형

github.com/kuimoani/defold/wiki/CREATE%20WITH%20DEFOLD

 

kuimoani/defold

translate defold manual to Korean. Contribute to kuimoani/defold development by creating an account on GitHub.

github.com

 

반응형
Posted by Dream Come True
IT/인터넷 마케팅2019. 12. 16. 13:38
반응형

아래소스를 사용하면 pyautogui 마우스 좌표를 쉽게 표시 할 수 있습니다.

Here is a short Python 3 : python3 버젼
#! python3
import pyautogui, sys
print('Press Ctrl-C to quit.')
try:
    while True:
        x, y = pyautogui.position()
        positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4)
        print(positionStr, end='')
        print('\b' * len(positionStr), end='', flush=True)
except KeyboardInterrupt:
    print('\n')

 

 

 


Here is the Python 2 version: python2 버젼


#! python
import pyautogui, sys
print('Press Ctrl-C to quit.')
try:
    while True:
        x, y = pyautogui.position()
        positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4)
        print positionStr,
        print '\b' * (len(positionStr) + 2),
        sys.stdout.flush()
except KeyboardInterrupt:
    print '\n'

 

 

결과는 다음과 같이 실시간으로 표시 된다.

>>> pyautogui.size()
(1920, 1080)
>>> pyautogui.position()
(187, 567)

 

반응형

'IT > 인터넷 마케팅' 카테고리의 다른 글

python 엑셀 자동화 [업무자동화]  (13) 2021.02.24
defold 한글 메뉴얼  (4) 2020.12.17
python 특정 디렉토리 파일 이동 프로그램  (7) 2012.01.10
python Function Description  (4) 2010.12.07
log 파일 생성 raw input  (6) 2010.12.07
Posted by Dream Come True
IT/인터넷 마케팅2012. 1. 10. 09:51
반응형

특정 디렉토리의 파일들을 특정 디렉토리 로 날짜별 폴더를 만들어 그날짜에 맞는 파일을 폴더로 이동 시키는 것이다.
그림파일이나 로그파일 분석시 좋습니다.


http://jof4002.net/%EB%83%A5%EB%82%A0/Python 

냥날이라는 분의 코드를 모디 파이 했습니다.
참고하세요.


반응형

'IT > 인터넷 마케팅' 카테고리의 다른 글

python 엑셀 자동화 [업무자동화]  (13) 2021.02.24
defold 한글 메뉴얼  (4) 2020.12.17
python 마우스 실시간 위치 좌표로 표시  (6) 2019.12.16
python Function Description  (4) 2010.12.07
log 파일 생성 raw input  (6) 2010.12.07
Posted by Dream Come True