일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- c언어
- 데이터시각화
- 이수증
- 핵심프로젝트
- 자연수의성질
- 선형분류모델
- C++
- 언리얼프로젝트
- 정보처리기사필기
- 코딩테스트
- html/css
- 딥러닝
- 머신러닝
- 중학수학
- 디버깅
- 데이터베이스
- numpy/pandas
- 언리얼학습
- 정보처리기사실기
- 자바 실습
- Orange
- pandas
- 요구사항확인
- 선형회귀모델
- 파이썬
- 데이터입출력구현
- 자바
- 데이터분석
- 텍스트마이닝
- JSP/Servlet
- Today
- Total
목록numpy/pandas (13)
클라이언트/ 서버/ 엔지니어 " 게임 개발자"를 향한 매일의 공부일지
보호되어 있는 글입니다.
보호되어 있는 글입니다.
보호되어 있는 글입니다.
이번에는 데이터는 추출하는 방법에 대해서 공부해보려고 한다. 데이터를 분석하는 과정이 이렇게 여러 단계가 있다는 걸 알아가는 중이다. 먼저 데이터 추출은 어떻게 하는 것인지 학습해보기로 하자.바로 이론 학습에 들어가본다. 이론 6 - 데이터 추출하기 특정한 조건에 맞는 데이터를 추출할 때 복잡한 조건을 작성하기 위해 필요하다. 파이썬에서는 and, or, not이라고 썼지만 pandas에서는 기호를 사용한다. 그리고 모든 조건은 소괄호를 사용해 묶어주어야 한다. 코드가 길어져도 어떤 작업을 위한 코드인지만 파악하면 쉽게 이해할 수 있다. 라벨을 활용한 데이터 추출 : loc위치를 뜻하는 location의 약자이다. 인덱스 이름과 컬럼 이름을 좌표로 삼아 해당 데이터를 추출한다...
보호되어 있는 글입니다.
조금 전에 pandas로 데이터를 불러오고 저장하며 원하는 데이터를 출력하는 실습을 진행해보았다. 이번에는 데이터를 변환하는 방법에 대해서 학습해보기로 하자.바로 이어서 학습을 진행해본다. 데이터의 목적에 따라 사용하려면 변환 작업이 꼭 필요할 것이다. 이론 3 - 데이터 변환하기 1 데이터 타입 변환이란 데이터의 자료형을 변환하는 것이다. 입장객의 평균을 구할 때 연산이 필요하지만, 텍스트 타입으로 되어 있어 연산 값이 제대로 나오지 않는다. 올바른 계산을 위해 텍스트를 정수형 타입으로 바꾸어주어야 한다. df에 어른 타입의 컬럼을 astype의 int로 변환한다. 그런 다음 어른 컬럼에 저장하면 df의 타입이 int로 변환된 것을 확인할 수 있다. 만약 메서드들이 원본 데이터를 바꿔버..
보호되어 있는 글입니다.
보호되어 있는 글입니다.
보호되어 있는 글입니다.
이번에 학습할 단원은 Numpy 연산이다. 이것도 배열이니 연산을 할 수 있나보다. Numpy가 처음에는 무척 어렵게 느껴졌는데 해보니 별거 아니었다. 배열은 조금 알고 있으면 충분히 이해할 수 있는 부분이었다.그럼 바로 다음 학습을 진행해보자! 이론 4 - Numpy 연산 파이썬에서 몇 가지 연산은 느리게 진행된다. 이 예시에서 보면 value 값을 받아서 빈 데이터를 받은 array의 길이만큼 만든다. 반복문을 돌면서 기존에 가진 데이터에 5를 추가해서 쓰고 그것을 돌려주는 함수이다.values는 1~10까지인 size가 5인 ranint라고 하면, 여기에 5개를 붙여서 이 함수를 출력한다. 1~100까지 있는 1천만개의 데이터를 수행한다면, 큰 array에 대해서는 수행 시간이 느리다는 것을..