일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Kotlin
- Tkinter
- Excel
- math
- PostgreSQL
- list
- Apache
- gas
- PANDAS
- Google Excel
- Google Spreadsheet
- dataframe
- google apps script
- Mac
- c#
- SQL
- django
- matplotlib
- string
- GIT
- Java
- Redshift
- Github
- PySpark
- hive
- 파이썬
- numpy
- Python
- array
- Today
- Total
목록PANDAS (66)
달나라 노트
DataFrame.assign assign은 apply와 비슷하게 내가 원하는 로직을 DataFrame의 어떤 컬럼에 적용시킨 후, 새로운 컬럼을 추가하여 변경된 DataFrame을 반환합니다. 먼저 test용 DataFrame을 생성합니다. import pandas as pd dict_item = { 'item_id': [1, 2, 3, 4], 'item_name': ['a', 'b', 'c', 'd'], 'price': [1000, 2000, 3000, 4000] } df_item = pd.DataFrame(dict_item) print(df_item) print(type(df_item)) - Output item_id item_name price 0 1 a 1000 1 2 b 2000 2 3 c 3..
Python Pandas Python에서 Pandas library는 아마 엑셀같은 형태의 데이터를 다루기 위해 가장 많이 사용되는 library중 하나가 아닐 까 싶네요.저도 pandas를 거의 필수적으로 사용하고있다보니 상당히 유용한 library인 것은 틀림없는 것 같습니다. Pandas의 자료구조 : Series, DataFrame Pandas에는 대표적으로 Series와 DataFrame이라는 두 가지의 자료구조가 존재합니다. import pandas as pd list_item = [1, 2, 3, 4] # Pandas의 Series가 될 list 선언 se_item = pd.Series(list_item) # list를 이용하여 Series 생성 print(se_item) print(type..