Skip to content

Latest commit

 

History

History
22 lines (20 loc) · 506 Bytes

595. Big Countries.md

File metadata and controls

22 lines (20 loc) · 506 Bytes

595. Big Countries

Question Link

Pandas Solution

import pandas as pd

def big_countries(world: pd.DataFrame) -> pd.DataFrame:
    big_df = world[(world['area'] >= 3000000) | (world['population'] >= 25000000)]
    result_df = big_df[['name','population','area']]
    return result_df

SQL Solution

# Write your MySQL query statement below
SELECT
name,population,area
FROM
World
WHERE
area >= 3000000 OR population >= 25000000