I have a pandas dataframe named 'brics' with columns names given by 'country', '...
✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
I have a pandas dataframe named 'brics' with columns names given by 'country', 'capital', 'area' and 'population' and indices given by 'FR', 'IT' and 'UK'. I want to construct a pandas dataframe with the only two columns 'country' and 'capital' and only for the indices 'FR' and 'IT'. Which command should I use?