일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- c#
- math
- array
- Mac
- Excel
- google apps script
- Apache
- GIT
- PANDAS
- django
- matplotlib
- 파이썬
- Google Spreadsheet
- Java
- Github
- Kotlin
- SQL
- Python
- dataframe
- numpy
- Redshift
- hive
- Tkinter
- Google Excel
- gas
- list
- PySpark
- string
- PostgreSQL
- Today
- Total
목록key (4)
달나라 노트
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(..
C#에서 Keyboard로 어떤 키를 입력하는 Event를 처리해봅시다. using System; using System.Windows.Forms; class MyProgram { public static void Main() { Form fm = new Form(); fm.Text = "Sample Window"; fm.Width = 300; fm.Height = 200; Label lbl = new Label(); lbl.Text = "Welcome!"; lbl.Parent = fm; void fm_key_input(Object sender, KeyEventArgs e) { lbl.Text = e.KeyCode.ToString(); } fm.KeyDown += new KeyEventHandler(fm..
sorted, sort 모두 python의 list 속 요소들을 정렬할 수 있습니다. list_test = [5, 3, 1, 4, 2] list_test.sort(reverse=False) print(list_test) list_test = [5, 3, 1, 4, 2] list_test.sort(reverse=True) print(list_test) -- Result [1, 2, 3, 4, 5] [5, 4, 3, 2, 1] 먼저 sort method를 봅시다. 위처럼 어떤 list에 적용하여 sort가 적용된 list 자체를 정렬시켜버립니다. (sort method는 적용된 list 자체에 변형을 가하고 아무 return값이 없습니다.) 또한 reverse라는 option을 명시하여 오름차순/내림차순 정..
Original source = play.kotlinlang.org/byExample/01_introduction/01_Hello%20world Kotlin에는 Map이라는 collection이 있습니다. 결론부터 말하자면 Python의 dictionary와 비슷합니다. Key = Value가 하나의 쌍(pair)이 되고 이 쌍이 하나의 Map에 여러 개 존재할 수 있습니다. 다음 예시를 보시죠. var map_test: MutableMap = mutableMapOf( // 1 "Apple" to 1, "Strawberry" to 2, "Pineapple" to 3, "Orange" to 4 ) var map_test_2: Map = mapOf( // 2 1 to 10, 2 to 20, 3 to 18, ..