import pandas as pd
import [Link] as plt
# 1. Create DataFrame
country = [Link]({
"Country": ["China","India","United States","Indonesia","Brazil","Pakistan"],
"Population":
[1379750000,1330780000,324882000,260581000,206918000,194754000],
"BirthRate": [12.00,21.76,13.21,18.84,18.43,27.62],
"UpdateDate": ["2016-08-11","2016-08-11","2016-08-11","2016-01-07","2016-
08-11","2016-08-11"]
})
print("Original DataFrame:\n", country)
# 2. Display complete data for China and India
print("\nData for China and India:\n")
print(country[country["Country"].isin(["China", "India"])])
# 3. Display Country, Population, BirthRate of Brazil and Pakistan
print("\nCountry, Population and BirthRate for Brazil and Pakistan:\n")
print([Link][country["Country"].isin(["Brazil", "Pakistan"]),
["Country","Population","BirthRate"]])
# 4. Save to CSV file
country.to_csv("[Link]", index=False)
print("\nCSV file '[Link]' created successfully!")
# 5. Plot Bar Chart (Country vs Population)
[Link](country["Country"], country["Population"], color="lightgreen",
edgecolor="black")
[Link]("Population of Countries")
[Link]("Country")
[Link]("Population")
[Link](True, linestyle="--", alpha=0.6)
[Link]()