일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- boost
- python
- conda
- expect
- postgresql
- ngui
- if
- 배열
- List
- pi
- dataframe
- c++11
- 쉘
- pandas
- sqlite
- sql
- ubuntu
- with
- awk
- Eclipse
- Shader
- Unity
- SSH
- SVN
- null
- FIND
- DROP
- autovacuum
- C++
- mysql
- Today
- Total
목록python (25)
その先にあるもの…
출처: https://rfriend.tistory.com/450 [R, Python 분석과 프로그래밍의 친구 (by R Friend)] [Python pandas] DataFrame, Series의 행, 열 개수 세기 이번 포스팅에서는 Python pandas의 DataFrame, Series 의 행, 열의 개수를 세는 방법(how to count the number of rows and columns of pandas DataFrame and Series)을 소개하겠습니다. 간단한 것들이고, 이미.. rfriend.tistory.com 이번 포스팅에서는 Python pandas의 DataFrame, Series 의 행, 열의 개수를 세는 방법(how to count the number of rows a..
x1 x2 x3 x4 0 1 11 111 12 1 2 22 222 13 2 3 33 333 14 # 열(column) 삭제 del df['x1'] # axis = 1 세로 축 df = df.drop( 'x2', 1 ) df = df.drop( ['x3','x4'] , 1 ) # 행(row) 삭제 # 1번행 삭제 df = df.drop( 1, 0 ) # axis = 0 가로 축 # 0-,2번행 삭제 df = df.drop( [0,2], 0 )
http://apis.map.kakao.com/web/ 불러오는 중입니다... http://apis.map.kakao.com/web/guide 의 simpleserver는 파이썬2의 명령어 $ python2 -m SimpleHTTPServer 8080 Python 3.x $ python3 -m http.server 8080 8080 포트로 간단한 HTTP 서버가 띄워집니다. 웹브라우저로 http://localhost:8080에 접속해보면 명령을 실행한 디렉토리의 파일내역이 보여진다. index.html이 있다면 웹 페이지가 보여질것.
https://dateutil.readthedocs.io/en/stable/examples.html from datetime import * from dateutil.relativedelta import * 동월동시 전년 구하기 now = datetime.now() print(now+relativedelta(years=-1)) 동월동시 내년 구하기 now = datetime.now() print(now+relativedelta(years=-1)) 동년동시 전월 구하기 now = datetime.now() print(now+relativedelta(months=-1)) 어제날짜 구하기 now = datetime.now() print(now+relativedelta(days=-1)) 특정일로 부터 계산하기 ..
https://www.anaconda.com/ Anaconda | The World's Most Popular Data Science Platform Anaconda is the standard platform for Python data science, leading in open source innovation for machine learning. Develop, manage, collaborate, and govern at scale with our enterprise platform. www.anaconda.com 버전을 선택해서 다운로드를 한다. CMD에서 #버전 확인 conda --version conda search python # 아나콘다 가상환경 생성(파이썬 버전 변경이 용이하다) co..
with 블록 파일을 다룰 때 with 블록을 통해 명시적으로 close() 메소드를 호출하지 않고도 파일을 닫을 수 있습니다. 파일 객체는 내부적으로 __enter__(), __exit__() 가 구현이 되어 있습니다. with 블록이 자동으로 블록을 종료할 때 __exit__() 메소드를 호출하며 파일을 close 시키게 됩니다. file = open('text.txt') print( file.readline(), end='') file.close() 위의 코드를 with ... as로 바꾸면 다음과 같다. with open('text.txt') as file : print(file .readline(), end='')