1

I have a data frame with n columns and only one row. I want to plot the distribution of the values for a complete row. Below is my data frame with different columns and only one row.

      O13   O117     O5    O31    O49    O58    O70   O103    O10    O69  ...  \
0  83.0  147.0  195.0  170.0  216.0  237.0  334.0  386.0  253.0  414.0

Can someone please help me to know how can i plot a distribution plot for all the values in a row in a single plot.

1 Answer 1

1

just transpose your dataframe.

import seaborn as sns
df = pd.read_csv(io.StringIO("""      O13   O117     O5    O31    O49    O58    O70   O103    O10    O69  ...  
0  83.0  147.0  195.0  170.0  216.0  237.0  334.0  386.0  253.0  414.0"""), sep="\s+")

sns.displot(df.T)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.