pandas provides methods that allow us to clearly state how we want to index. We can also distinguish between indexing based on values of the index of the series, and indexing based on the position of objects in the series, as would be the case if we were working with a list. The two methods we'll focus on are loc and iloc. loc focuses on selecting based on the index of the series, and if we try to select key elements that don't exist, we will get an error. iloc indexes as if we were working with a Python list; that is, it indexes based on integer position. So, if we were to try to index with a non-integer in iloc, or try to select an element outside of the range of valid integers, an error will be produced. There is a hybrid method, ix, that acts like loc, but if passed input that cannot be interpreted with respect to the index, it will act like iloc...
United States
United Kingdom
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Argentina
Austria
Belgium
Bulgaria
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
Greece
Hungary
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Singapore
Slovakia
Slovenia
South Africa
South Korea
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine