문제
Find the activity date and the pe_description of facilities with the name 'STREET CHURROS' and with a score of less than 95 points.
name이 'STREET CHURROS'와 score가 95미만인 activity date 와 pd_description 조회하기
코드
# Import your libraries
import pandas as pd
# Start writing code
result = los_angeles_restaurant_health_inspections[(los_angeles_restaurant_health_inspections['facility_name'] == 'STREET CHURROS') &
(los_angeles_restaurant_health_inspections['score'] < 95)
][['activity_date', 'pe_description']]
result['activity_date'] = result['activity_date'].dt.date
result
출처
반응형
'Algorithm > Python' 카테고리의 다른 글
[프로그래머스] 직사각형 별찍기 (Python) (0) | 2021.08.20 |
---|---|
[stratascratch] Bikes Last Used(Python) (0) | 2021.08.19 |
[stratascratch] Customer Details(Python) (0) | 2021.08.15 |
[stratascratch] Order Details(Python) (0) | 2021.08.15 |
[stratascratch] Largest Olympics(Python) (0) | 2021.08.15 |