일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 |
30 | 31 |
- Java
- Excel
- 파이썬
- Google Spreadsheet
- PySpark
- Mac
- numpy
- matplotlib
- list
- Apache
- Google Excel
- gas
- Github
- dataframe
- Tkinter
- PostgreSQL
- Python
- string
- hive
- django
- PANDAS
- Redshift
- google apps script
- SQL
- array
- c#
- math
- Kotlin
- GIT
- Today
- Total
목록Python (379)
달나라 노트
pandas의 rank() method는 특정 column을 기준으로 ranking을 매겨줍니다. Syntax rank(ascending={True, False}, method={'min', 'max', 'dense', 'first', 'average'}, pct={True, False}, na_option={'keep', 'top', 'bottom}, numeric_only={True, False}) - ascending (default = True) True -> ranking을 매길 때 오름차순으로 정렬하여 rank를 매김. 따라서 원본 데이터가 더 작은 값일수록 더 1위에 가까운 rank를 얻게 됨. False -> ranking을 매길 때 내림차순으로 정렬하여 rank를 매김. 따라서 원본 데이..
pandas의 sample method는 DataFrame에서 랜덤한 행을 추출해줍니다. Syntax DataFrame.sample(frac=float, replace=True/False, ignore_index=True/False) - frac 이 옵션은 0~1 사이의 실수를 받습니다. fraction의 약자로 원본 DataFrame의 존재하는 row의 개수 중 몇%를 추출할지를 결정합니다. 0.5는 원본 DataFrame에 존재하는 row의 개수가 10개라면 그의 50%인 5개만 추출합니다. 1은 원본 DataFrame에 존재하는 row의 개수가 10개라면 그의 100%인 10개를 추출합니다. - replace 이 옵션은 행을 중복되게 추출하는걸 허용할지를 결정합니다. replace = True ->..
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..
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에 담긴..