일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- PostgreSQL
- dataframe
- c#
- Tkinter
- PySpark
- Google Spreadsheet
- django
- gas
- numpy
- list
- matplotlib
- string
- math
- Kotlin
- Apache
- Github
- Python
- Redshift
- hive
- PANDAS
- Mac
- Java
- Excel
- 파이썬
- google apps script
- SQL
- Google Excel
- GIT
- array
- Today
- Total
목록분류 전체보기 (832)
달나라 노트
SQL을 다루다보면 어떤 table의 정보가 필요한 경우가 있습니다. 여기서 말하는 정보란 table에 존재하는 column의 종류, column의 자료형(data type), column에 들어갈 수 있는 데이터의 최대 크기 등을 의미합니다. 이러한 정보들을 DDL(Data Definition Language, Data Description Language)이라고 합니다. SQL에서 DDL이란 보통 table의 이름, table에 존재하는 column 종류, 각 column의 data type, column들이 수용할 수 있는 데이터의 최대 크기, distinct key, sort key 등 table의 특징에 관한 정보를 담은 내용을 의미합니다. (더 자세하고 정확히 말하면 위 설명보다 더 상세한 정..
Syntax dictionary.keys() dictionary에 존재하는 모든 key를 return 합니다. dictionary.values() dictionary에 존재하는 모든 value를 return 합니다. dictionary.items() dictionary를 구성하는 모든 key, value 값을 tuple로 묶어서 return 합니다. 예시를 봅시다. dict_test = { 'key1': 1, 'key2': 2, 'key3': 3 } print(dict_test.keys()) -- Result dict_keys(['key1', 'key2', 'key3']) - dict_test.keys() dict_test에 keys() method를 적용했습니다. 그 결과 값을 보니 dict_keys(..
Syntax dictionary.setdefault(key, default_value) setdefault method는 dictionary에 적용할 수 있는 method이며 2개의 인자를 받습니다. - key setdefault method는 전달받은 key값에 대한 value를 dictionary에서 찾아 return 해줍니다. - default_value 만약 전달받은 key값이 dictionary에 없을 경우 default_value를 return합니다. dict_test = { 'key1': 1, 'key2': 2, 'key3': 3 } val_result_1 = dict_test.setdefault('key1', 10) print(val_result_1) -- Result 1 위 예시를 봅시다..
list에 적용할 수 있는 append, extend method를 알아보고 이 둘의 차이에 대해 알아보겠습니다. Syntax list.append(element) append method는 parameter로서 받은 값을 list의 가장 오른쪽에 추가해줍니다. Syntax list.extend(iterable_value) extend method는 iterable type의 값을 받아 그 값들을 list의 가장 오른쪽에 단일 요소로서 추가해줍니다. iterable type의 값을 받는다는 것은 list, set, tuple, dictionary 등의 값을 받는다는 것입니다. 9, 'value1' 등의 단일 값을 전달하면 extend는 오류를 발생시킵니다. 여기까지 보면 설명이 잘 이해되지 않아도 app..