mirror of
https://github.com/wahyd4/code-sandbox.git
synced 2026-08-08 21:03:28 +10:00
12 lines
384 B
Python
12 lines
384 B
Python
import pandas as pd
|
|
dict = {"country": ["Brazil", "Russia", "India", "China", "South Africa"],
|
|
"capital": ["Brasilia", "Moscow", "New Dehli", "Beijing", "Pretoria"],
|
|
"area": [8.516, 17.10, 3.286, 9.597, 1.221],
|
|
"population": [200.4, 143.5, 1252, 1357, 52.98]}
|
|
|
|
brics = pd.DataFrame(dict)
|
|
print(brics)
|
|
|
|
brics.index = ["BR", "RU", "IN", "CH", "SA"]
|
|
print(brics)
|