파이썬 '판다스 데이터 분석' - 함수 : sample(), .at[idx,'컬럼명'],pop('컬럼명') ,nlargest(idx, list), isin([])
그 밖의 df 함수 랜덤한 한 행의 데이터 보기 df.sample() mpgcylindersdisplacementhorsepowerweightaccelerationmodel yearoriginname 25525.14140.088.002720.015.4781 ford fairmont (man) 하나의 값에 접근 df.at[idx, '컬럼명'] df.at[397,'mpg'] 31.0 한 컬럼 전체가 반환되고 원 데이터프레임에서 drop 된다. Return item and drop from frame. Raise KeyError if not found. df.pop('mpg') 가장 큰 값 n 번째까지 리턴 df.nlargest(idx, list) >>> df.nlargest(3, ['a', 'c']) a b..
2021. 7. 14.