ค้นหาชื่อและความจุของหอพักที่มีสิ่งอำนวยความสะดวกน้อยที่สุด
Find the name and capacity of the dorm with least number of amenities.
has_amenity = {'dormid': [], 'amenid': []}; dorm_amenity = {'amenid': []}; dorm = {'dorm_name': [], 'student_capacity': [], 'dormid': []}
df = pd.merge(df, has_amenity, how='inner', on='dormid'); df = pd.merge(df, dorm_amenity, how='inner', on='amenid'); df.groupby('dormid').count().idxmin().values[0]