본문 바로가기 메뉴 바로가기

Data Makes Our Future

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Data Makes Our Future

검색하기 폼
  • 분류 전체보기 (740)
    • Data (18)
      • Statistics (10)
      • Analysis (8)
    • SQL (24)
      • Organize (3)
      • Install (2)
    • R (58)
      • Collection (4)
      • Process (33)
      • Analysis (11)
      • Visualize (4)
      • Install (3)
    • Python (56)
      • Collection (10)
      • Process (27)
      • Visualize (2)
      • Install (3)
    • Web (164)
      • API (16)
      • Spring (58)
      • JAVA (49)
      • Infra (11)
    • PS (366)
      • Algorithm (45)
      • Problem_Solving (311)
      • PS_Note (7)
    • Books (35)
    • ADsP (4)
    • eTc (15)
  • 방명록

데이터프레임 (2)
[Python] DataFrame의 멀티인덱스와 멀티컬럼(Multi-index, Multi-column)

Multi-index & Multi-column #. 생성 - 인덱스의 개수, 상위 level & 하위 level의 개수가 일치해야 함 - 생성할 일은 많지 않음 :( 1. Series s1 = Series([1,2,3,4,5,6], index=[['a','a','b','b','c','c'], [1,2,1,2,1,2]]) s1a 1 1 2 2 b 1 3 2 4 c 1 5 2 6 dtype: int64 2. DataFrame 생성 후 설정 df1 = DataFrame({'value':[1,2,3,4,5,6], 'ind1':['a','a','b','b','c','c'], 'ind2':[1,2,1,2,1,2]}) df1 = df1.set_index(['ind1','ind2']) # 리스트 형식으로 인덱스에 동..

Python/Process 2019. 2. 12. 17:39
[Python] Pandas - DataFrame

참고글[Python] Pandas - DataFrame 관련 메서드[Python] DataFrame 그룹 함수 적용(map,apply,applymap)[Python] Pandas - Series [Python] profile 만들기 (import를 한 번에) DataFrame - Series의 집합 - 서로 다른 데이터 타입을 갖는 column - Data Frame의 Key : column / Series의 Key : row를 의미 # 생성%run profileimport pandas as pdfrom pandas import Series, DataFrame 1. 한 번에 생성fruits = DataFrame({'name':['apple','mango','banana','cherry'], 'price'..

Python/Process 2019. 2. 8. 17:02
이전 1 다음
이전 다음
최근에 올라온 글
최근에 달린 댓글
링크
  • Gitbook
  • resume
Total
Today
Yesterday
TAG
  • java
  • Algorithm
  • DATA
  • PYTHON
  • 백준
  • C
  • BFS
  • spring
  • DFS
  • R
  • dp
  • BOJ
  • coding
  • 시뮬레이션
  • c++
more

Blog is powered by Tistory / Designed by Tistory

티스토리툴바