Skip to Content
밑바닥부터 시작하는 데이터 과학 데이터 분석을 위한 파이썬 프로그래밍과 수학·통계 기초
book

밑바닥부터 시작하는 데이터 과학 데이터 분석을 위한 파이썬 프로그래밍과 수학·통계 기초

by Joel Grus, Hangyeol Kim, Seongju Ha, Eunjung Park
May 2022
Beginner to intermediate
448 pages
13h 7m
Korean
Insight
Content preview from 밑바닥부터 시작하는 데이터 과학 데이터 분석을 위한 파이썬 프로그래밍과 수학·통계 기초
from Scratch
35
󽴜󽴔󺃬󼆃󽴔󻺏󼩴󽴔󼧓󺴫󺋇󺱧󻃜
2.19
객체 지향 프로그래밍
다른 프로그래밍 언어처럼 파이썬에서도 클래스(
class
)를 사용해서 객체 지향 프
로그래밍(
object
-
oriented
programming
)을 하면 데이터와 관련 함수를 하나로 묶
어 줄 수 있다. 코드를 더 깔끔하고 간단하게 작성하기 위해 클래스를 가끔씩 사
용할 것이다. 예제 코드의 주석으로 클래스를 설명하는 것이 가장 간단할 것 같다.
예제로 ‘데이터 과학 고급 강의’ 같은 모임에 몇 명이 참가했는지 확인해 주는
CountingClicker
클래스를 만들 것이다.
이 클래스에는 참석자 수를 나타내는
count
변수,
count
를 증가시키는
click
메서드, 현재
count
를 반환해 주는
read
메서드 그리고
count
0
으로 재설정해
주는
reset
메서드가 필요할 것이다. (실제로 참석자를 셀 때
9999
다음에
0000
으로 넘어가는 카운팅 기계를 사용하기도 하지만 이런 경우는 무시하겠다.)
먼저 클래스를 정의하기 위해서는
class
뒤에 파스칼케이스(
PascalCase
)
9
클래스의 이름을 표기하면 된다.
class CountingClicker:
"""
함수처럼
클래스에서도
주석을
추가할
있다
"""
클래스는
0
개 이상의 멤버 함수를 포함한다. 모든 멤버 함수의 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

안드로이드 멀티스레딩: 비동기 메커니즘으로 날렵하고 안정적인 앱 만들기

안드로이드 멀티스레딩: 비동기 메커니즘으로 날렵하고 안정적인 앱 만들기

한대희, 안데르스 예란손

Publisher Resources

ISBN: 9788966262571