반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- GIT
- 파이썬
- list
- matplotlib
- gas
- PANDAS
- Tkinter
- Python
- Java
- SQL
- Redshift
- math
- PySpark
- string
- array
- Kotlin
- Excel
- numpy
- c#
- dataframe
- google apps script
- Google Spreadsheet
- PostgreSQL
- Mac
- hive
- django
- Github
- Apache
- Google Excel
Archives
- Today
- Total
목록pathlib (1)
달나라 노트
Python : pathlib (OS 상관없이 호환되는 filepath 생성하기. Mac/Linux/Windows OS file path. 경로 분석. directory functinos. 파일 읽기. 파일 쓰기. file read. file write)
어떤 폴더나 파일의 경로를 나타낼 때 보통 우리는 아래와 같은 표현 방식을 사용합니다. my_program/tester/Code/test_program.py 근데 위 표현식은 OS에 따라 에러를 일으킬 수 있습니다. Mac/Linux에서는 폴더, 파일 구분자로서 슬래쉬(Slash, /)를 사용하지만, Windows에서는 폴더, 파일 구분자로서 역슬래쉬(Backward slash, \)를 사용하기 때문입니다. Mac/Linux = my_program/tester/Code/test_program.py Windows = my_program\tester\Code\test_program.py 혼자서 프로그래밍을 한다면 또는 그렇게 규모가 크지 않은 협업을 한다면 위 차이가 전혀 상관없을 수 있습니다. 저 또한 M..
Python/Python Basic
2023. 8. 13. 18:42