목록isin() (1)
컴공생의 다이어리
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/boEeHA/btrgFTcPBTY/c5RRLUkzaYJMEljKwPXD9K/img.png)
pandas dataframe 특정 조건에 맞는 데이터 추출 pandas dataframe에서 특정 조건에 맞는 데이터를 추출하는 방법에 대해 정리하고자 한다. 데이터가 아래와 같이 있다고 가정한다. import pandas as pd df = pd.DataFrame([{"country":"한국","population":500},{"country":"미국","population":450},{"country":"싱가폴","population":705}, {"country":"호주","population":878},{"country":"베트남","population":660},{"country":"대만","population":808}]) 여기서 만일 country가 한국일 때를 선택하고 싶다면 아래와 같이..
데이터 분석 & 머신러닝
2021. 10. 6. 00:01