목록공부 (9)
보리차

Matplotlib 파이썬에서 데이터를 그래프나 차트로 시각화 할 수 있는 라이브러리 그래프 그려보기 import matplotlib.pyplot as plt x = [1, 2, 3, 4, 5] y = [1, 2, 3, 4, 5] plt.plot(x, y) plt.title("First Plot")# 그래프 타이틀 plt.xlabel("x")# x축 plt.ylabel("y")# y축 # 오브젝트 오리엔티드 인터페이스? x = [1, 2, 3, 4, 5] y = [1, 2, 3, 4, 5] fig, ax = plt.subplots() ax.plot(x, y) ax.set_title("First Plot")# 그래프 타이틀 ax.set_xlabel("x")# x축 ax.set_ylabel("y")# y축 ..
조건으로 검색하기 Numpy array와 마찬가지로 masking 연산이 가능하다. import numpy as np import pandas as pd df = pd.DataFrame(np.random.rand(5, 2), columns=['A', 'B']) df['A'] 0.3)] df.query("A 0.3") # 문자열이라면 다른 방식으로도 조건 검색이 가능하다. df['Animal'].str.contains('Cat')# Animal 컬럼에 Cat 문자열을 포함하면 True df.Animal.str.match('Cat') 함수로 데이터 처리하기 ..

Pandas 구조화된 데이터를 효과적으로 처리하고 저장할 수 있는 파이썬 라이브러리. Array 계산에 특화된 numpy를 기반으로 만들어져서 다양한 기능들을 제공한다. Series numpa array가 보강된 형태 Data와 Index를 가지고 있다. import pandas as pd data = pd.Series([1, 2, 3, 4]) data 인덱스를 가지고 있고 인덱스로 접근 가능하다. data = pd.Series([1, 2, 3, 4], index=['a', 'b', 'c', 'd'])# index 지정 data['b] # 2 딕셔너리로 만들 수 있다. population_dict = { 'korea': 5180, 'japan': 12718, 'china': 141500, 'usa': 3..

NumPy Numerical Python Python에서 대규모 다차원 배열을 다룰 수 있게 도와주는 라이브러리 데이터를 다루는데 왜 다차원 배열이 필요할까? 데이터의 대부분은 숫자 배열로 볼 수 있다. Python List? 파이썬 리스트로도 계산 할 수 있지만 numpy는 list에 비해서 빠른 연산을 지원하고 메모리를 효율적으로 사용한다. 배열 만들기 list(range(10)) # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] import numpy as np np.array([1, 2, 3, 4, 5]) # array([1, 2, 3, 4, 5]) np.array([1, 2, 3, 4, 5]) # array([1, 2, 3, 4, 5]) np.array([3, 1.4, 2, 3, 4])..
CSV: Comma Separated Value 각 열이 특정한 의미를 가짐 # movies.csv # 국문 제목, 영문 제목, 개봉 연도 다크나이트, The Dark Knight, 2008 겨울 왕국, Frozen, 2013 슈렉, Shrek, 2001 슈퍼맨, Supterman, 1978 # 다른 구분 문자(delimiter)도 사용 가능 다크나이트|The Dark Knight|2008 겨울 왕국|Frozen|2013 슈렉|Shrek|001 슈퍼맨|Supterman|1978 => 엑셀에서 불러와서 표로 만들 수 있다. 용량이 매우 작다. 영화 제목에 콤마가 들어가면? => 큰따옴표(" ")를 이용하여 데이터를 감싼다. # movies.csv 먹고 기도하고 사랑하라,"Eat, Pray, Love", 2..
딕셔너리(dictionary) {key: value} key: 값을 찾기 위해 넣어 주는 데이터 value: 찾고자 하는 데이터 empty_dict = {} new_dict = {'apple': '사과', 'book': '책'} new_dict['human'] = '사람'# 값 추가 딕셔너리는 원하는 값을 빠르게 찾을 수 있다. 딕셔너리의 키: 키로 넣을 수 있는 값에 제한이 있다. # {[ID, 비밀번호]: 계정 정보} kdhong = ['kdhong', 'cantcalldad'] accounts = { kdhong: ('Kildong Hong', ...), } kdhong[0] = 'kdhong.elice' # 키 값을 변형하면 x => 파이썬은 변하지 않는 값 만을 key값으로 받을 수 있다. 즉 ..
문자열 함수 .startswith( ) word = "superman" print(word.startswith('s')# True .split( ) numbers = " 1 2 3 " print(numbers.split()) >>> ['1', '2', '3'] numbers = " 1 2 3 " print(numbers.split(' ')) >>> [' ', '1', ' ', '2',' ', '3', ' '] 대표적 공백 문자 ' '빈칸(스페이스바) '\t'Tab(Tab 키) '\n'Newline(엔터 키) .lower( ) 대소문자 변환 intro = "My name is Elice!" print(intro.upper()) >>> "MY NAME IS ELICE!" print(intro.lower())..
Chapter 1-2. Introduction & O/S Structures 1.1 What Operating Systems Do An operating system is a software that manages a computer's hardware. It also provides a basis for application programs and - acts as an intermediary between - the computer user and the computer hardware. A computer system can be divided roughly into four components: - the hardware, - the operating system, - the application..
운영 체제란? - An operation system is a software that operates a computer system - 운영체제란 컴퓨터 시스템을 운영하는 소프트웨어(OS) 컴퓨터의 정의 - A computer is a machine that processes the information. - 컴퓨터란 정보를 처리하는 기계이다. 정보의 정의 - An information can be defined as a quantitative representation that measures the uncertainty. - 정보는 어떤 불확실성을 측정해 수치적으로 표현한 것이다. - 클로드섀넌이 정보에 대해 수학적으로 정의함. l(x) = -log2P(x) 사건 x의 정보량 l은 사건 x가 일어..