본문 바로가기

My Brain

(99)
[파이썬] if, elif, else 구문 파이썬에는 if(만약에) 관련 3가지 구문이 있다. if(만약에), elif(만약에2~), else(그 나머지는) 예시는 아래와 같다. ​ weather = input("Enter weather (sunny, rainy, snowy): ") ​ if weather.lower() == "sunny": print("Wear a t-shirt") #해가뜨는 날이면 t-Shirt를 입어라 ​ elif weather.lower() == "rainy": print("Bring an umbrella and boots") #비가오는 날이면, 우산과 부츠를 가져가라 ​ elif weather.lower() == "snowy": print("Wear a warm coat and hat") #눈이 오는 날이면, 코트와 모자..
[파이썬] Boolean string methods (Yes or No) Boolean string methods Boolean 구문은 몇 가지 기능이 있다. ​ 1) .isalpha() : 어떤 구문이 알파벳 으로 구성 되어 있으면 True print("Python".isalpha()) >> True ​ 2) .isalnum(): 어떤 구문이 알파벳과 숫자로 구성 되면 True print(3rd".isalnum()) >> True ​ 3) .startswith(): 어떤 구문이 정확한 지칭하는 문자 포함하면 True, (단 대,소문자 구분함) print("Boolean".startswith("B")) >> True ​ 4) .islower(): 소문자로만 구성 되었을 때 True ​ 5) .isupper(): 대문자로만 구성 되었을 때 True ​ 6) .istitle():..
[파이썬] Pandas Cheat Sheet - Pandas Cheat Sheet 라는 이름으로 요약된 자료 공유 합니다.
[파이썬] Model Development (Residual Plot) What is a residual(잔여, 남은)? The difference between the observed value (y) and the predicted value (Yhat) is called the residual (e). When we look at a regression plot, the residual is the distance from the data point to the fitted regression line. So what is a residual plot? A residual plot is a graph that shows the residuals on the vertical y-axis and the independent variable on the horizontal ..
[파이썬] Model Development (Linear Regression (선형 회귀)) Data Analytics, we often use Model Development to help us predict future observations from the data we have. -Linear Regression (선형 회귀): Simple Linear Regression is a method to help us understand the relationship between two variables: The predictor/independent variable (X) The response/dependent variable (that we want to predict)(Y) The result of Linear Regression is a linear function that pred..
[파이썬] Data Analysis - Descriptive Statistic: 기술적 통계학, 서술적 통계학, 연속형 데이터를 몇개의 의미있는 수치로 요약하여 데이터의 전반적인 특성을 파악하는것. 대부분 통계학의 기초인 평균, 편차 및 기본적인 통계값을 의미한다. - Correlation (상관 관계): 한쪽이 증가하면 다른 한쪽도 증가하거나 반대로 감소하는 경향을 인정하는 두 변량 사이의 통계적 관계. 예) df[[ ]].corr() 을 통하여 correlation value를 구할 수 있다. import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns path='https://s3-api.us-geo.objectstorage.so..
[파이썬] Data wrangling - #Datawrangling, sometimes referred to asdata munging, is the process of transforming andmapping datafrom one "raw" data form into anotherformatwith the intent of making it more appropriate and valuable for a variety of downstream purposes such as analytics. Adata wrangleris a person who performs these transformation operations. Data wrangling은 raw data(flat data)에서 일정한 format이 있는 형태로 변경하여 Anyl..
[파이썬] Model Evaluation using Visualization (Model Development)