prettyplotlib

Python boxplot out of columns of different lengths

ぃ、小莉子 提交于 2019-12-22 05:09:09
问题 I have the following dataframe in Python (the actual dataframe is much bigger, just presenting a small sample): A B C D E F 0 0.43 0.52 0.96 1.17 1.17 2.85 1 0.43 0.52 1.17 2.72 2.75 2.94 2 0.43 0.53 1.48 2.85 2.83 3 0.47 0.59 1.58 3.14 4 0.49 0.80 I convert the dataframe to numpy using df.values and then pass that to boxplot. When I try to make a boxplot out of this pandas dataframe, the number of values picked from each column is restricted to the least number of values in a column (in this

Python boxplot out of columns of different lengths

南楼画角 提交于 2019-12-05 05:17:58
I have the following dataframe in Python (the actual dataframe is much bigger, just presenting a small sample): A B C D E F 0 0.43 0.52 0.96 1.17 1.17 2.85 1 0.43 0.52 1.17 2.72 2.75 2.94 2 0.43 0.53 1.48 2.85 2.83 3 0.47 0.59 1.58 3.14 4 0.49 0.80 I convert the dataframe to numpy using df.values and then pass that to boxplot. When I try to make a boxplot out of this pandas dataframe, the number of values picked from each column is restricted to the least number of values in a column (in this case, column F). Is there any way I can boxplot all values from each column? NOTE: I use df.dropna to