在 Python 中处理分类数据
Kasey Jones
Research Data Scientist


sns.catplot(x="Traveler type", kind="count",col="User continent",col_wrap=3,palette=sns.color_palette("Set1"), data=reviews)
x:"Traveler type"kind:"count"col:"User continent"col_wrap:3palette:sns.color_palette("Set1")"Set1"、"Set2"、"Tab10"、"Paired"
axax.fig.suptitle("My title")ax.set_axis_labels("x-axis-label", "y-axis-label")plt.subplots_adjust(top=.9)ax = sns.catplot(x="Traveler type", col="User continent", col_wrap=3,
kind="count", palette=sns.color_palette("Set1"), data=reviews)
ax.fig.suptitle("Hotel Score by Traveler Type & User Continent")
ax.set_axis_labels("Traveler Type", "Number of Reviews")
plt.subplots_adjust(top=.9)
plt.show()

在 Python 中处理分类数据