일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- list
- PANDAS
- c#
- gas
- Google Spreadsheet
- Google Excel
- Kotlin
- django
- dataframe
- string
- numpy
- PySpark
- Excel
- Mac
- math
- array
- matplotlib
- Github
- Python
- Apache
- SQL
- Java
- hive
- PostgreSQL
- Redshift
- google apps script
- Tkinter
- 파이썬
- GIT
- Today
- Total
목록PNG (2)
달나라 노트
dataframe_image library를 이용하면 Pandas의 DataFrame을 image로 저장할 수 있습니다. pip install dataframe-image 먼저 위처럼 dataframe-image library를 설치합시다. 설치시에는 underscore(_)가 아니라 dash(-)를 써야합니다. import pandas as pd import dataframe_image as dfi dict_item = { 'item_id': [1, 1, 3, 4], 'item_name': ['a', 'a', 'c', 'd'], 'price': [1000, 2000, 3000, 4000], 'flag': ['n', 'y', 'y', 'n'] } df_item = pd.DataFrame(dict_item..
Python을 이용해 image 파일을 pdf로 변환하는 방법을 알아봅시다. pip install PIL pip install Pillow 사용되는 라이브러리는 PIL 입니다. PIL이 간혹 설치가 제대로 되지 않는 경우가 있을 수 있는데 그럴 땐 Pillow 패키지를 설치합시다. (Pillow 패키지를 설치해도 PIL 라이브러리는 이용할 수 있습니다.) from PIL import Image img = Image.open(r'test/img_test_1.png') img_rgb = img.convert('RGB') img_rgb.save('test/pdf_test_1.pdf') 위 예시는 test directory에 있는 img_test_1.png라는 이미지파일을 test directory안에 pdf_..