การสร้างภาพข้อมูลระดับกลางด้วย Seaborn
Chris Moffitt
Instructor

matplotlib เป็นพื้นฐานสำหรับการสร้างภาพข้อมูลของ Seabornimport matplotlib.pyplot as plt import pandas as pddf = pd.read_csv("wines.csv")fig, ax = plt.subplots() ax.hist(df['alcohol'])

pandas เป็นไลบรารีพื้นฐานสำหรับวิเคราะห์ข้อมูลimport pandas as pddf = pd.read_csv("wines.csv") df['alcohol'].plot.hist()

histplot คล้ายกับฮิสโตแกรมในตัวอย่างก่อนหน้าimport seaborn as snssns.histplot(df['alcohol'])

displot ใช้งาน histplot และฟังก์ชันอื่นสำหรับกราฟการกระจายimport seaborn as snssns.displot(df['alcohol'], kind='kde')

df['alcohol'].plot.hist()

sns.displot(df['alcohol'])

การสร้างภาพข้อมูลระดับกลางด้วย Seaborn