I\'m somewhat new to pandas. I have a pandas data frame that is 1 row by 23 columns.
I want to convert this into a series? I\'m wondering what the most pythonic way
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