1

I have 2 data frame like this: enter image description here

I want to create a box plot like this for them based on their indexes: enter image description here

How can I do that? I just can make a separate box plot for each data frame.

I couldnt draw this plot with other topics

CFD
  • 607
  • 1
  • 11
  • 29
  • Possible duplicate of [matplotlib: Group boxplots](https://stackoverflow.com/questions/16592222/matplotlib-group-boxplots) – Kristian K. Mar 01 '19 at 01:05
  • @KristianK. help me, I couldnt apply that on my problem – CFD Mar 01 '19 at 01:13
  • You copied the image from [this question](https://stackoverflow.com/questions/16592222/matplotlib-group-boxplots). Did you actually try any of the 6 answers given over there? What is the problem? – ImportanceOfBeingErnest Mar 01 '19 at 01:15
  • @ImportanceOfBeingErnest I have data frame but in that post is just a list of data – CFD Mar 01 '19 at 01:16
  • Each column of a dataframe is a 1D array and a 1D array can be seen as list. But also the complete dataframe is a 2D array (which you get as array via `df.values`), so that is good enough as input for a boxplot. – ImportanceOfBeingErnest Mar 01 '19 at 01:28
  • @ImportanceOfBeingErnest What are Positions in a dataframe? Positions is defined [1,2] in that topic – CFD Mar 01 '19 at 01:46
  • 1
    You could use `np.arange(len(df.columns))-0.5` and `np.arange(len(df.columns))+0.5` respectively. – ImportanceOfBeingErnest Mar 01 '19 at 02:01

0 Answers0