So, basically axes shape is (nrows, ncols) and in this case:
array([[<matplotlib.axes._subplots.AxesSubplot object at 0x7f4267f425f8>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f4267f1bb38>],
[<matplotlib.axes._subplots.AxesSubplot object at 0x7f4267ec95c0>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f4267ef9080>]],
dtype=object)
Now, when we do ax=axes[0], we get an array and not the axes.
Try the below code:
fig, axes = plt.subplots(2, 2)
ax = sns.boxplot(x="Species", y="SepalLengthCm", data=iris, orient='v',
ax=axes[0, 0])
ax = sns.boxplot(x="Species", y="SepalWidthCm", data=iris, orient='v',
ax=axes[0, 1])
ax = sns.boxplot(x="Species", y="PetalLengthCm", data=iris, orient='v',
ax=axes[1, 0])
ax = sns.boxplot(x="Species", y="PetalWidthCm", data=iris, orient='v',
ax=axes[1, 1])
If you wish to learn more about how to use python for data science, then go through this data science python course by Intellipaat for more insights.