INTRO sqldf를 이용한 DB 조회 Rstudio Console> install.packages("sqldf") plyr을 이용한 데이터 처리 내장함수이며 데이터 분리, 결합 등 데이터 처리기능 제공 # 참고 : dplyr은 c++로 구현되어 속도가 빠르고 chaining(var >> calc1 >> calc2, 중간변수 없이 최종값 계산)을 사용할 수 있음. 설치 필요 Rstudio Console> install.packages("dplyr") sqldf test_sqldf.R rm(list=ls()) setwd = "~/Rcoding" ## sqldf library(sqldf) data(iris) sqldf("select * from iris") sqldf("select * from iris l..

INTRO 1. 벡터형 변수 2. 행렬/데이터프레임 test_indexing.R rm(list = ls()) setwd("/Users/[YourMacID]/Rcoding") a_chr = c('a', 'b', 'c', 'd', 'e') ## vector indexing a_chr[1] a_chr[-1] a_chr[c(2,4)] a_chr[1:3] ## dataframe indexing income = c(100,200,150,300,900) car = c('kia','hyundai','kia','toyota','lexus') marriage=c(FALSE,FALSE,FALSE,TRUE,TRUE) mydat = data.frame(income,car,marriage) print(mydat) mydat[3,..
INTRO 1. 백터 : vector 2. 행렬 : matrix 3. 데이터 프레임 : dataframe 1. Vector - 하나 이상의 스칼라 원소들을 갖는 집합 - 숫자, 문자, 논리 연산자 등 - 'c'(concentration, 연결)를 통해 선언 2. Matrix - m(행,row) x n(열,col) 형태 데이터 구조 3. DataFrame - R에서 가장 널리 사용 - 2차원 목록 데이터 구조 test_data.R ## vector by c x1 = c(1,10,24,40) y1 = c("사과", "바나나", "오렌지") z1 = c(TRUE, FALSE, TRUE) x2 z1 = c(TRUE, FALSE, TRUE) > x2 y2 z2 ## vector combine > xy1 ## ma..
INTRO Office계에 Excel이 python에는 pandas가 있다. python pandas는 통합 구조화된 데이터를 다루기에 최적화되어있으며 선택이 아닌 필수라 할 수 있다. pandas가 제공하는 data 구조와 indexing, 연산을 다루어 본다. Contents - Data Object : Series, DataFrame - Indexing, Operation pandas libray가 없으면 terminal에서 pip를 이용하여 먼저 설치한다. $ pip install pandas python code : pyTest/pyPandas1.py # -*- coding: utf-8 -*- import datetime import pandas as pd today = datetime.date..
- Total
- Today
- Yesterday
- 자가격리
- analysis
- arduino
- vscode
- DS18B20
- template
- pyserial
- 코로나19
- server
- git
- raspberrypi
- CSV
- Python
- 코로나
- Raspberry Pi
- sublime text
- Django
- 라즈베리파이
- SSH
- MacOS
- r
- ERP
- DAQ
- Templates
- COVID-19
- Model
- Pandas
- Regression
- github
- 확진
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |