본문 바로가기

Python/Pandas

[부스트코스] [머신러닝을 위한 파이썬] Pandas Selection & Drop

1. Selection

  • 한 개의 column선택
    • df["account"]
  • 1개 이상의 column 선택
    • df[["account", "street", "state"]]
  • column 이름 없이 사용하는 index number는 row 기준 선택
    • df[:3]
  • column이름과 함께 row index 사용시, 해당 column만 선택
    • df["account"][:3]

'Python > Pandas' 카테고리의 다른 글

MySQL에 np.nan을 갖는 pandas.DataFrame 삽입하기  (0) 2021.10.01
[Python] Pandas .loc[] 과 .iloc[]  (0) 2021.01.18
Pandas  (0) 2020.07.25