본문 바로가기

Python10

Python 가상환경 특정 version 설치하기 가상환경 폴더 하나 만들기 cd virtualfolderPython -m venv [가상환경 명]  파이썬 특정버전 pytion -[버전] -m venv [가상환경 명]python -3.12 -m venv [가상환경 명] 가상환경 실행하기가상환경설치폴더/가상환경이름/Scripts/activate 비활성deactivate 생성했던 가상환경 삭제sudo rm -rf 가상환경 명또는 폴더 삭제 2024. 12. 28.
python 무료 강의 무료 강의 좋은 것 같음 파이썬을 이용한 웹 스크래핑 부스트코스 무료 강의 www.boostcourse.org 2023. 3. 28.
pandas string find method (문자 찾기) dataframe을 . (콤마)로 handling 가능 하다. After you’ve loaded the data into the DataFrame, you can quickly query the whole pandas column to filter for entries that contain a substring: >>> >>> companies[companies.slogan.str.contains("secret")] company slogan 7 Maggio LLC target secret niches 117 Kub and Sons brand secret methodologies 654 Koss-Zulauf syndicate secret paradigms 656 Bernier-Kihn secretly.. 2023. 3. 25.
python winsound beep 소리 내기 프로그램이 실행이 끝나면 소리로 알려 주는 코드로 사용 하면 좋을거 같다. winsound library를 이용. 1 2 3 4 5 6 7 8 9 10 11 12 def beepsound(): # 도,레,미,파,솔,라,시 Hz so1 = {'do':261,'re':293,'mi':329,'pa':349,'sol':391,'ra':440,'si':493} mel = ['do','mi','mi', 'mi','sol','sol', 're','pa','pa','ra','si','si'] dur = [4,4,2, 4,4,2, 4,4,2, 4,4,2] mel2 = ['sol','do','ra','pa','mi','do','re'] dur2 = [1,1,1,1,1,1,1] music = zip(mel,dur) mus.. 2023. 2. 4.