본문 바로가기

파이썬

(16)
[파이썬] 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 (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..
[파이썬] Linear Regression (Model Development)
[파이썬] 나의 파이썬 학습순서 코로나 바이러스로 인하여, 평소에 취미로 #Programing 을 해 보기로 항상 생각만 해보다가 이번에 거의 10년 만에 나이 41살이 되어서야 실천으로 옮겨 보았다. 누가 알려준 것도 아니고 그냥 #무료학습 을(EdX 기반) 시작해 보자는 취지로 시작하였고 아직까지 실행해 보고 있다. (따라서 이 순서가 옳고 그름은 아님, 참고만 하시길) 2020년 3월 14일부터 시작 한 #프로그래밍 시간 날 때마다 짬짬이 해 가고 있다. 나의 #파이썬학습순서 는 아래와 같다. 0. CS50's Introduction to Computer Science 1. Youtube - 나도코딩 2. Introduction to Python: Absolute Beginner (MS / EdX) 3. Introduction t..
[파이썬] What is Phython? (파이썬은 무엇인가?) ​ ​#파이썬 은 큰 뱀을 의미한다. 개발자가 좋아하던 쇼 이름에서 유래된 재미있는 프로그램의 시작이다. What is Python? Python is a widely-used, interpreted, object-oriented, and high-level programming language with dynamic semantics, used for general-purpose programming. And while you may know the python as a large snake, the name of the Python programming language comes from an old BBC television comedy sketch series called Monty Python'..