
# Import pandas as pd
import pandas as pd 
# Pre-defined lists
names = ['United States', 'Australia', 'Japan', 'India', 'Russia', 'Morocco', 'Egypt']
dr =  [True, False, False, False, True, True, True]
cpc = [809, 731, 588, 18, 200, 70, 45]
"""print(cars.keys)"""


# Create dictionary my_dict with three key:value pairs: my_dict
my_dict={'country':names,
'drives_right':dr,'cars_per_cap':cpc}

# Build a DataFrame cars from my_dict: cars
cars=pd.DataFrame(my_dict)
cars.index=['US','AU','JP','IND','RUS','MOR','EGY']

# Print cars
print(cars)
print(cars[['country']])
print(cars.loc[['US']])



# Import pandas as pd
import pandas as pd 
# Pre-defined lists
names = ['United States', 'Australia', 'Japan', 'India', 'Russia', 'Morocco', 'Egypt']
dr =  [True, False, False, False, True, True, True]
cpc = [809, 731, 588, 18, 200, 70, 45]
"""print(cars.keys)"""


# Create dictionary my_dict with three key:value pairs: my_dict
my_dict={'country':names,
'drives_right':dr,'cars_per_cap':cpc}

# Build a DataFrame cars from my_dict: cars
cars=pd.DataFrame(my_dict)
cars.index=['US','AU','JP','IND','RUS','MOR','EGY']

# Print cars
print(cars)
print(cars[['country']])
print(cars.loc[['US']])


# Import pandas as pd # Pre-defined lists print(cars.keys) # Create dictionary my_dict with three key:value pairs: my_dict # Build a DataFrame cars from my_dict: cars # Print cars