SyntaxFix
Write A Post
Hire A Developer
Questions
data = pd.DataFrame({"a":[1,2,3,34],"b":[5,6,7,8]}) new_data = pd.melt(data) new_data.set_index("variable", inplace=True)
This gives a dataframe with index as column name of data and all data are present in "values" column