일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- db
- 지마켓
- oracle
- r
- Websocket
- spring MVC(모델2)방식
- test
- 자바
- pytorch
- (깃)git bash
- tomoto
- 과학백과사전
- 네이버뉴스
- 게시판 만들기
- Gmarket
- 幼稚园杀手(유치원킬러)
- java
- mysql
- RESFUL
- 이력서
- 방식으로 텍스트
- word2vec
- 코사인 유사도
- Python
- 토픽추출
- lda
- jsp 파일 설정
- 크롤링
- 파이썬
- Topics
- Today
- Total
목록Python (124)
무회 Blog
1. zip 파일을 푼다
# # mod1.py # data = """def add(a, b): # return a + b # def sub(a, b): # return a-b # """ # with open("mod1.py", "w") as f: # f.write(data) # import mod1 as gg # print(gg.add(8,2)) # gg.sub(100,30)
# 파이썬 + - * / 연산을 할수 있는 클래스 class FourCal: def __init__(self, first, second): self.first = first self.second = second # def setdata(self,first,second): # self.first = first # self.second = second def add(self): result = self.first + self.second return result def mul(self): result = self.first * self.second return result def sub(self): result = self.first - self.second return result def div(self)..
import requests from bs4 import BeautifulSoup import re rq = requests.get("naver.com") print(type(rq)) #
-사용코드 txt = 'Show me the money.' word_1 = txt.count('S') word_2 = txt.count('o') word_3 = txt.count('m') print(word_1) print(word_2) print(word_3) Series 의 행 개수를 셀 때 s.size 와 같이 뒤에 () 가 없다는 것 조심해야 겠습니다.그리고 > count()는 Null 값이 아닌 행(count Non-null rows)만 세며, > size() 는 Null 값인 행도 모두 포함해서 행(size of all rows)을 센다 는 것도 유념하면 좋겠습니다. 구분 pandas DataFrame (df) pandas Series (s) 행 개수 세기 (row count) len(df) ..