I need to create a dataframe as given below and then later I need to add values as per rows and column.Can anybody please tell me how can i do this?
ColA ColB ColC
Name 2 21 10
Roll 4 67 21
CodePudding user response:
IIUC use:
df = pd.DataFrame(index= ['Name','Roll'], columns=['ColA', 'ColB', 'ColC'])
df.loc['Name','ColA'] = val