bismillah capekk
This commit is contained in:
@@ -177,16 +177,16 @@ def standardize_country_names_asean(df: pd.DataFrame, country_column: str = 'cou
|
||||
def assign_pillar(indicator_name: str) -> str:
|
||||
"""
|
||||
Assign pillar berdasarkan keyword indikator.
|
||||
Return values: 'Availability', 'Access', 'Utilization', 'Stability', 'Other'
|
||||
Return values: 'Availability', 'Access', 'Utilization', 'Stability', 'Supporting'
|
||||
All ≤ 20 chars (varchar(20) constraint).
|
||||
"""
|
||||
if pd.isna(indicator_name):
|
||||
return 'Other'
|
||||
return 'Supporting'
|
||||
ind = str(indicator_name).lower()
|
||||
|
||||
for kw in ['requirement', 'coefficient', 'losses', 'fat supply']:
|
||||
if kw in ind:
|
||||
return 'Other'
|
||||
return 'Supporting'
|
||||
|
||||
if any(kw in ind for kw in [
|
||||
'adequacy', 'protein supply', 'supply of protein',
|
||||
@@ -215,7 +215,7 @@ def assign_pillar(indicator_name: str) -> str:
|
||||
]):
|
||||
return 'Utilization'
|
||||
|
||||
return 'Other'
|
||||
return 'Supporting'
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user