[Solved] python – how do i assign columns to my dataframe?
import pandas as pd varnames = [‘Student_id’,’First_Name’,’Last_Name’,’Grade’] values = [[‘156841′,’Mark’,’Smith’,’85’], [‘785496′,’Jason’,’Gross’,’90’], [‘785612′,’Laura’,’Clarkson’,’76’], [‘125465′,’Tria’,’Carr’,’100′]] data1 = pd.DataFrame(values, columns=varnames) data1 solved python – how do i assign columns to my dataframe?