목록분류 전체보기 (213)
archive

1. 데이터 프레임의 이해 -데이터 프레임은 데이터를 다룰 때 가장 많이 사용하는 데이터의 형태 -행과 열로 구성된 사각형 모양의 표처럼 생김 성별 연령 학점 연봉 남자 26 3.8 2700만원 여자 42 4.3 4000만원 남자 35 2.6 3500만원 -위 표는 4개의 속성에 대한 3명의 자료로 구성이 된 데이터 프레임이라고 할 수 있게 되는 것이다. -열은 속성이다: 세로로 나열이 되는 열은 속성을 나타내며, 열은 컬럼(column) 혹은 변수(variable)이라고 불림 -행은 한 사람의 정보다 : 가로로 나열되는 행은 각 사람의 정보를 나타내며, 행은 로(row) 혹은 케이스 (case)라고 함 -한 사람의 정보는 가로 한 줄에 나열이 된다, 즉 한 행 내에 모두 나열이 된다. -따라서 무엇이든..

1. 패키지 로드, 패키지 내부 함수 이용하기 -패키지의 함수를 사용하려면 우선 패키지를 로드해야하는데, 이는 import 키워드를 활용하여 가능하다 -패키지 약어롤 지정하려면 패키지를 로드하는 코드 뒤에 as 와 약어를 입력하면 된다 -패키지의 함수를 이용하려면 도트 연산자 (.)를 이용하여 seaborn.countplot() 과 같이 사용한다 -countplot 함수는 빈도막대그래프로 값의 개수(빈도)를 막대이 길이로 표현하는 함수로 매개변수로 x와 y의 값을 지정할 수 있다. import seaborn as sns var=['a','a','b','c'] sns.countplot(x=var) - load_dataset( ) 메소드는 seaborn 패키지 안에 담긴 메소드로 이를 이용하면 seaborn..

We want to construct the Calculator, Calc, Add, Sub, Mul, and Div classes in order for the attached main method to work properly. • Calculator has one Calc field. • The setCalculator method of Calculator takes one parameter and can receive Add, Sub, Mul, and Div objects as parameters. When each object is received, it can be set as the field. • The run method of Calculator receives two integers t..
1. 자동 타입 변환 (Promotion) - 자동적으로 타입 변환이 일어나는 것 - 자동 타입 변환이 일어날 조건 부모타입 변수 = 자식타입객체 ; 즉, 자식타입의 객체가 상위 타입인 부모타입의 변수에 대입되는 경우 자동 타입 변환이 일어남 - 자식은 부모의 특징과 기능을 상속받기 때문에 부모와 동일하게 취급될 수 있음, 예를들어 고양이가 동물의 특징과 기능을 상속받았다면 '고양이는 동물이다' 가 성립하게 된다. - 따라서 Cat 객체를 Animal 타입의 변수에 대입하면 자동 타입 변환이 일어난다. Cat cat= new Cat(); Animal animal=cat; //cat은 자동 타입 변환이 일어나 Animal 타입의 변수 animal에 대입이 가능해진다. - Animal animal=new C..

The Point class and the main method is as follows. Implement the ColorPoint class and the Point3D class so that the following console window can be shown. package April27; public class Point { private int x, y; public Point(int x, int y) { this.x=x; this.y=y; } public int getX() {return x;} public int getY() {return y;} protected void move(int x, int y) { this.x=x; this.y=y; } } package April27;..

1. Develop a simple program of reservation system for a concert. The specification of the system is as follows. • There are three seat types: S type, A type, B type. • The number of seats for each row is fixed to be 16. • There are four menu for reservation system: Reserve, Search, Cancel, Quit • For Reserve menu, only one seat can be reserved for each reservation. The program should receive the..