
import pandas
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sb
import numpy
Data = pd.read_excel('D:/ucw class/Busi 652/team project/seattle-weather.xlsx')
\#print(Data)
Data.head()
Data.shape
\#pd.cut(precipitation,bins=\[0,10,20,30,40\],labels=\['SUNNY','DRIZZLE','RAIN','SHOWER'\])
sb.countplot(x ="weather", Data = Data, palette = 'rocket') ----the error is on x ="weather"???
countrain = len(Data\[Data.weather == 'rain'\])
countsun = len(Data\[Data.weather == "sun"\])
countdrizzle = len(Data\[Data.weather == 'drizzle'\])
countsnow = len(Data\[Data.weather == "snow"\])
countfog = len(Data\[Data.weather == "fog"\])
我想根据这些专栏画一个情节,但在这行:sb。countplot(x=“weather”。我在“weather”上遇到了一个错误。