빅데이터분석기사/작업 1유형
킹카운티 주거지 가격 예측 문제 데이터
hyerimir
2022. 8. 15. 20:57
https://www.datamanim.com/dataset/03_dataq/typeone.html#id6
작업 1유형 — DataManim
Question 각 비디오는 10분 간격으로 구독자수, 좋아요, 싫어요수, 댓글수가 수집된것으로 알려졌다. 공범 EP1의 비디오정보 데이터중 수집간격이 5분 이하, 20분이상인 데이터 구간( 해당 시점 전,후
www.datamanim.com
Question
bedrooms 의 빈도가 가장 높은 값을 가지는 데이터들의 price의 상위 10%와 하위 10%값의 차이를 구하여라
import pandas as pd
df = pd.read_csv("https://raw.githubusercontent.com/Datamanim/datarepo/main/kingcountyprice//train.csv")
df.head()
answer = df.loc[df.bedrooms ==df.bedrooms.value_counts().index[0]].price.quantile(0.9) \
-\
df.loc[df.bedrooms ==df.bedrooms.value_counts().index[0]].price.quantile(0.1)
print(answer)