일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- gas
- PANDAS
- Java
- Redshift
- Apache
- google apps script
- hive
- GIT
- 파이썬
- django
- PySpark
- Python
- Mac
- Google Spreadsheet
- SQL
- dataframe
- Github
- math
- matplotlib
- numpy
- Tkinter
- c#
- array
- Google Excel
- PostgreSQL
- Excel
- list
- string
- Kotlin
- Today
- Total
목록openpyxl (10)
달나라 노트
cell 객체의 fill 옵션을 조절하면 셀에 색상을 채울 수 있습니다. import pandas as pd from openpyxl.styles import PatternFill dict_test = { 'col1': [1, 2, 3, 4, 5], 'col2': ['a', 'b', 'c', 'd', 'e'], 'col3': [1234, 0.27383720, 39372, None, 102947291.293472], 'col4': [0.9, 0.5238, 0.13, 0.0028, 1024.29278], } df_test = pd.DataFrame(dict_test) xlsx_writer = pd.ExcelWriter('test.xlsx', engine='openpyxl') df_test.to_excel(x..
cell 객체의 border 옵션을 조절하면 cell의 테두리를 설정할 수 있습니다. import pandas as pd from openpyxl.styles import Border, Side dict_test = { 'col1': [1, 2, 3, 4, 5], 'col2': ['a', 'b', 'c', 'd', 'e'], 'col3': [1234, 0.27383720, 39372, None, 102947291.293472], 'col4': [0.9, 0.5238, 0.13, 0.0028, 1024.29278], } df_test = pd.DataFrame(dict_test) xlsx_writer = pd.ExcelWriter('test.xlsx', engine='openpyxl') df_test.to..
cell 객체의 number_format을 이용하면 숫자의 형식을 지정할 수 있습니다. import pandas as pd dict_test = { 'col1': [1, 2, 3, 4, 5], 'col2': ['a', 'b', 'c', 'd', 'e'], 'col3': [1234, 0.27383720, 39372, None, 102947291.293472], 'col4': [0.9, 0.5238, 0.13, 0.0028, 1024.29278], } df_test = pd.DataFrame(dict_test) xlsx_writer = pd.ExcelWriter('test.xlsx', engine='openpyxl') df_test.to_excel(xlsx_writer, sheet_name='test', i..
openpyxl의 cell 객체를 이용하면 특정 cell의 다양한 정보를 가져올 수 있습니다. import pandas as pd dict_test = { 'col1': [1, 2, 3, 4, 5], 'col2': ['a', 'b', 'c', 'd', 'e'], 'col3': [1234, 0.27383720, 39372, None, 102947291.293472], 'col4': [0.9, 0.5238, 0.13, 0.0028, 1024.29278], } df_test = pd.DataFrame(dict_test) xlsx_writer = pd.ExcelWriter('test.xlsx', engine='openpyxl') df_test.to_excel(xlsx_writer, sheet_name='test..