I have the following df
| 1 | 2 | 3 |
-------------------------
0.11 0.25 0.74
0.32 0.93 0.26
0.44 0.28 0.76
0.15 0.29 0.79
etc.
I'm using bins:
bins = [0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1]
I created 3 bin columns and ran a value_counts() on them. So now I know how many values are in each bin for each of these 3 columns. But I'm having trouble plotting this into a barplot. Looking for a triple bar graph
df['Bin1'] = pd.cut(df['1'], bins)
df['Bin2'] = pd.cut(df['2'], bins)
df['Bin3'] = pd.cut(df['3'], bins)
Bin1_count = df['Bin1'].value_counts().values
Bin2_count = df['Bin2'].value_counts().values
Bin3_count = df['Bin3'].value_counts().values
x_axis = df['Bin1'].value_counts().index
sns.barplot(x = x_axis, y = [Bin1_count,Bin2_count,Bin3_count])
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)