Slice rows and columns from pandas DataFrame

Use DataFrame.loc[] to extract rows with index 35 to 43 (inclusive) from the 'Industry' and 'Year Established' columns.
import pandas as pd df = pd.read_csv('/data/companies.csv') # add code here...
subset = df.loc
print(subset.shape) # expected output: (9, 2)
Python
Setting up Python environment...
Output