Code:
fig = plt.figure(figsize = (6,6))
ax = fig.gca()
auto_price.loc[:, ['price', 'fuel-type', 'aspiration']].boxplot(by = 'fuel-type', 'aspiration', ax = ax)
ax.set_title('Box plot of price new')
ax.set_ylabel('Auto Price')
ax.set_ylim(0.0, 50000.0)
plt.show()
Error:
File "<ipython-input-20-0712de0416f5>", line 3
auto_price.loc[:, ['price', 'fuel-type', 'aspiration']].boxplot(by = 'fuel-type', 'aspiration', ax = ax, yx = yx)
^
SyntaxError: positional argument follows keyword argument
Background/additional information:
Following code works fine:
fig = plt.figure(figsize =(5,5))
ax = fig.gca()
auto_price.loc[:,['price', 'horsepower']].boxplot(by = 'horsepower', ax = ax)
ax.set_title('Box plot of price')
ax.set_ylabel('Auto Price')
ax.set_ylim(0.0, 50000.0)