Hello I have a dataframe that's assigned with two labels sample
and campaign
:
import numpy as np
var=np.random.sample(4)
sample = [1,1,2,2]
campaign = [1,2,1,2]
d = pd.DataFrame([var, sample, campaign]).transpose()
d.columns = ['var','sample','campaign']
and I want to plot the two campaign
boxplots side by side with var
as the y-axis, sample
as the x-axis.
Any idea how I can do this with seaborn
? I am unsure how to manipulate the dataframe using pd.melt
.. Or any other suggestion?
Cheers