data_mining

📝 Data Mining

[Data Mining] Crash_Course in Python Part.2

The Not-So-BasicsSortingx = [4,1,2,3]y = sorted(x) # is [1,2,3,4], x is unchangedx.sort() # now x is [1,2,3,4]# sort the list by absolute value from largest to smallestx = sorted([-4,1,-2,3], key=abs, reverse=True) # is [-4,3,-2,1]# sort the words and counts from highest count to lowestwc = sorted(word_counts.items(), key=lambda x: x[1], # x[1] 두번째 값을 기준으로 정렬 rev..

📝 Data Mining

[Data Mining] Crash_Course in Python Part.1

공백 서식 지정많은 언어들이 코드 블록들의 경계를 정하기 위해 괄호를 사용합니다. 파이썬은 이걸 indentation(' : ') 이라고 부릅니다.for i in [1, 2, 3, 4, 5]: print(i) for j in [1, 2, 3, 4, 5]: print(j) print(i + j) print(i)print("done looping")1122334455612132435465723142536475834152637485945162738495105done looping 괄호 및 괄호 안에 공백을 무시하는 경우입니다.long_winded_computation = (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + ..

Bigbread1129
'data_mining' 태그의 글 목록