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..
MariaDB 설치 $ brew update $ brew upgrade $ brew install mariadb 2022.01.16 기준 Server version: 10.6.4-MariaDB Homebrew mariadb upgrade 방법 $ brew update $ brew upgrade $ brew upgrade mariadb MariaDB server 시작 $ brew services start mariadb ==> Tapping homebrew/services Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services'... remote: Enumerating objects: 1686, done. remote: Count..
INTRO model의 field를 추가하거나 수정 시 DB schema 변경으로 발생하는 migrte 이슈 테스트 시 생성했던 model의 DB의 filed 이름, 종류, 속성, 수량(추가 또는 제거)이 변경될 때 발생 You have 1 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): [YourApp] Run 'python manage.py migrate' to apply them. - 개발서버 127.0.0.1:8000/admin 에서 DB 내용을 지운다 - admin.py, views.py, urls.py, forms.py 등에서 선언했던 import를 포함 주석처..
INTRO Django model db를 csv로 내보내기(db to csv export) DB Browser SQLite를 통해 csv export(csv 내보내기)도 가능 csv to django model db view request 기반 model manager(model.object.create)를 이용 DB 생성하고자하는 app의 views.py를 이용 : ORM path 용이 views.py from django.shortcuts import render from [Your-App].models import [model_name] from .data.db_to_csv_run import db_to_csv # Create your views here. def test_db_to_csv(requ..

INTRO Django model 생성 후 다수 DB를 생성할 때 csv를 이용하면 수월하다 DB Browser SQLite를 통해 csv export(csv 내보내기)도 가능 view request 기반 model manager(model.object.create)를 이용 DB 생성하고자하는 app의 views.py를 이용 : ORM path 용이 views.py from django.shortcuts import render from [Your-App].models import [model_name] from .data.csv_to_db_run import csv_to_db # Create your views here. def test_csv_to_db(request): csv_to_db([model..

INTRO DB Browser for SQLite 설치 DB Handling : CRUD(Create, Read, Update, Delete), Table 생성과 index, record INSERT DB data는 직접 SQL(Structured Query Language)을 다루어야 하나 여기서는 python을 이용한다. python의 pandas를 이용할 때 더욱 수월하며, 여기서는 맛보기만 배운다. 용어 SQLite MySQL나 PostgreSQL와 같은 데이터베이스 관리 시스템(DBMS)이지만, 서버가 아니라 응용 프로그램에 넣어 사용하는 비교적 가벼운 데이터베이스이다. 일반적인 RDBMS에 비해 대규모 작업에는 적합하지 않지만, 중소 규모라면 속도에 손색이 없다. 또 API는 단순히 라이브러리..
- Total
- Today
- Yesterday
- DS18B20
- vscode
- Pandas
- 자가격리
- DAQ
- arduino
- ERP
- Raspberry Pi
- 코로나19
- 라즈베리파이
- github
- MacOS
- Templates
- Django
- pyserial
- template
- COVID-19
- raspberrypi
- git
- r
- 코로나
- CSV
- Python
- Regression
- 확진
- SSH
- Model
- analysis
- server
- sublime text
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |