# @aartii.py on Instagram

- **Type:** Video
- **Original URL:** https://www.instagram.com/p/DW_oSrVjaht
- **Gondola URL:** https://gondola.cc/posts/63668165-aartiipy-instagram
- **Thumbnail:** https://img.gondola.cc/tr:w-,h-,fo-auto/postThumbnails/1bba6a4046.jpg
- **Posted:** 2026-04-11T14:13:30.000+00:00
- **Account Owner:** Aarti Sinha (@aartii.py) — https://gondola.cc/aartii.py

## Caption

One line of Python. 

Every row labelled automatically. Here’s the if-elif-else breakdown — fast: if score >= 50: Pass else: Fail Need more outcomes? 

Add elif: if age < 18: Minor elif age < 65: Adult else: Senior Citizen Now in data science — 

label an entire column: df[‘Result’] = df[‘Score’].apply( lambda x: ‘Pass’ if x >= 50 else ‘Fail’ ) No loop. No manual work. One line. Day 11 · 

Python for data science. Have you used this in a project yet?

#Python
#IfElse
#Pandas
#DataScience
LearnPython
PythonTips
aartii_py
DataScienceIndia

## Stats

- **Views:** 1,028
- **Likes:** 0
- **Shares:** 0
- **Comments:** 16

## Tags

python, ifelse, pandas, datascience

---
Copyright (c) Gondola