Skip to content

Commit 1a4b42a

Browse files
committed
Update 595. Big Countries.py
1 parent b292abe commit 1a4b42a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import pandas as pd
2+
3+
def big_countries(world: pd.DataFrame) -> pd.DataFrame:
4+
# Filter countries that are considered big by either area or population
5+
result = world[(world['area'] >= 3000000) | (world['population'] >= 25000000)][['name', 'population', 'area']]
6+
return result

0 commit comments

Comments
 (0)