Python(52)
-
변수와 자료형
변수: 필요한 자료를 일시적으로 보관하거나 처리 결과를 담을 수 있는 기억장소 역할 변수명 작성 규칙 1. 의미를 파악할 수 있는 이름으로 지정하는 것이 좋다. 2. 첫 자는 영문자로 시작한다. 3. 공백이나 특수문자는 사용하지 않는다. 4. 예약어는 사용할 수 없다. 5. 두 번째 단어는 숫자, under bar(_)를 사용할 수 있다. 6. 대문자와 소문자는 서로 다른 변수로 인식한다. (대소문자 구분) 변수와 메모리 주소(address) var1 = "Hello python" print(var1) print(id(var1)) Hello python 67239512 var1 = 100 print(var1) print(id(var1)) 100 1850632928 var2 = 150.25 print(va..
2023.02.21 -
DACON Python 튜토리얼 Lv4. 교차검증과 모델 앙상블을 활용한 와인 품질 분류하기
데이터 다운로드 # 데이터 다운로드 링크로 데이터를 코랩에 불러옵니다. !wget 'https://bit.ly/3i4n1QB' import zipfile with zipfile.ZipFile('3i4n1QB', 'r') as existing_zip: existing_zip.extractall('data') # 라이브러리 및 데이터 불러오기 import pandas as pd from sklearn.preprocessing import MinMaxScaler, OneHotEncoder, PolynomialFeatures from lightgbm import LGBMClassifier from xgboost import XGBClassifier from sklearn.ensemble import Random..
2023.01.19 -
DACON Python 튜토리얼 Lv3. 교차검증과 LGBM 모델을 활용한 와인 품질 분류하기
EDA !wget 'https://bit.ly/3i4n1QB' import zipfile with zipfile.ZipFile('3i4n1QB', 'r') as existing_zip: existing_zip.extractall('data') import pandas as pd import numpy as np import matplotlib import matplotlib.pyplot as plt import seaborn as sns # read_csv() 매서드로 train.csv , test.csv파일을 df class 로 불러오세요. train = pd.read_csv('data/train.csv') test = pd.read_csv('data/test.csv') # info() 매서드로 데이터..
2023.01.16 -
프로그래밍 시작하기: 파이썬 입문(Inflearn Original) Project
Hangman(행맨) 미니 게임 제작(1) # 기본 프로그램 제작 및 테스트 import time # 처음 인사 name = input("What is your name?") print("Hi, " + name, "Time to play hangman game!") print() time. sleep(1) print("Start Loading...") print() time.sleep(0.5) # 정답 단어 word = "secret" # 추측 단어 guesses = '' # 기회 turns = 10 # 핵심 While Loop # 찬스 카운트가 남아 있을 경우 while turns > 0: # 실패 횟수 failed = 0 # 정답 단어 반복 for char in word: # 정답 단어 내에 추측 문..
2023.01.15 -
DACON Python 튜토리얼 Lv2. 결측치 보간법과 랜덤포레스트로 따릉이 데이터 예측하기
데이터 다운로드 # 데이터 다운로드 링크로 데이터를 코랩에 불러옵니다. !wget 'https://bit.ly/3gLj0Q6' import zipfile with zipfile.ZipFile('3gLj0Q6', 'r') as existing_zip: existing_zip.extractall('data') --2023-01-12 03:54:03-- https://bit.ly/3gLj0Q6 Resolving bit.ly (bit.ly)... 67.199.248.10, 67.199.248.11 Connecting to bit.ly (bit.ly)|67.199.248.10|:443... connected. HTTP request sent, awaiting response... 301 Moved Permanen..
2023.01.12 -
DACON Python 튜토리얼 Lv1. 의사결정회귀나무로 따릉이 데이터 예측하기
데이터 다운로드 # 데이터 다운로드 링크로 데이터를 코랩에 불러옵니다. !wget 'https://bit.ly/3gLj0Q6' import zipfile with zipfile.ZipFile('3gLj0Q6', 'r') as existing_zip: existing_zip.extractall('data') --2023-01-11 08:15:16-- https://bit.ly/3gLj0Q6 Resolving bit.ly (bit.ly)... 67.199.248.11, 67.199.248.10 Connecting to bit.ly (bit.ly)|67.199.248.11|:443... connected. HTTP request sent, awaiting response... 301 Moved Permanen..
2023.01.11