SyntaxFix
Write A Post
Hire A Developer
Questions
df1 = pd.DataFrame({"gi":[232,66,34,43],"ptt":[342,56,662,123]}) p = df1.index.values df1.insert( 0, column="new",value = p) df1 new gi ptt 0 0 232 342 1 1 66 56 2 2 34 662 3 3 43 123