일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- matplotlib
- Mac
- numpy
- GIT
- Python
- array
- Java
- Tkinter
- gas
- django
- Github
- c#
- Apache
- string
- Google Excel
- PANDAS
- Redshift
- SQL
- math
- google apps script
- Kotlin
- PySpark
- hive
- Google Spreadsheet
- dataframe
- 파이썬
- Excel
- list
- PostgreSQL
- Today
- Total
목록분류 전체보기 (832)
달나라 노트
os library의 environ은 현재 컴퓨터의 모든 환경 변수를 출력해줍니다. import os print(os.environ) -- Reuslt environ({'PATH': '/Users/test/anaconda3/envs/project_test/bin:/Users/test/anaconda3/condabin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin', 'CONDA_DEFAULT_ENV': 'project_test', 'CONDA_EXE': '/Users/test/anaconda3/bin/conda', 'CONDA_PYTHON_EXE': '/Users/test/anaconda3/bin/python', 'C..
Redshift의 last_day 함수는 특정 날짜가 속한 달의 마지막 날짜를 return해줍니다. Syntax last_day(date or timestamp) 사용법은 간단합니다. parameter로써 날짜 type의 데이터나 timestamp type의 데이터를 받습니다. select last_day(to_date('20230216', 'yyyymmdd')) ; -- Result 2023-02-28 위 예시는 last_day 함수에 20230216이라는 날짜를 전달한 것입니다. (날짜를 전달할 땐 to_date 함수를이용해서 날짜 형식으로 바꿔줍니다.) 결과를 보면 2023년 2월의 마지막 날짜인 2023-02-28이 return됩니다. select last_day(to_date('20230908'..
Python library중 하나인 sys의 path는 환경 변수(PYTHONPATH)의 list를 출력해줍니다. import sys print(sys.path) -- Result [ '/Users/Documents/Code', '/Users/Documents/Code/temporary', '/Users/.conda/envs/customs', '/Users/.conda/envs/customs/lib/python3.8', '/Users/.conda/envs/customs/lib/python3.8/lib-dynload', '/Users/.conda/envs/customs/lib/python3.8/site-packages' ] sys.path를 이용해서 그 내용을 출력해보면 위같이 여러 경로가 list에 담긴..
일반적으로 pandas의 groupby를 이용하면 한번에 하나의 aggregate function밖에 사용할 수 없습니다. import pandas as pd dict_item = { 'date': [ 20200101, 20200102, 20200103, 20200101, 20200102, 20200103, 20200101, 20200102, 20200103, 20200101, 20200102, 20200103, 20200104 ], 'item_id': [ 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4 ], 'item_name': [ 'a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'd' ], 'price': [ 1000, ..