Assignment - pandas
Creating a DataFrame from a list of data and setting the index import pandas as pd #initialize a dataframe df = pd.DataFrame( [[21, 'Amol', 42, 67], [23, 'Lini', 78, 69], [32, 'Kiku', 74, 56], [52, 'Ajit', 54, 76]], columns=['rollno', 'name', 'physics', 'botony']) print('DataFrame with default index\n', df) #set column as index df = df.set_index('rollno') print('\nDataFrame with column as index\n',df) Create a DataFrame from the dictionary of lists import pandas as pd # dictionary of lists dict = {'name':["aparna", "pankaj", "sudhir", "Geeku"], 'degree': ["MBA", "BCA", "M.Tech", "MBA"], 'score':[90, 40, 80, 98]} # creating a dataframe from a dictionary df = pd.DataFrame(dict) print(df) Learn to create DataFrames.In the first example given above do the following 1. Add 1 more row [30,'...