text_plain_output_1.png
import pandas as pd

df = pd.read_csv('../input/szeged-weather/weatherHistory.csv')

df.isnull().sum()

df = df.dropna()
df.isnull().sum()

df['Formatted Date'] = df['Formatted Date'].str.split(' ').str[0].str.split('-').str[0]

df = df.rename(columns={'Formatted Date': 'Year'})

df = df.drop(['Loud Cover'], axis=1)

b = df[df['Year'] == '2007']
b.shape

temp_range_2007 = b['Temperature (C)'].max() - b['Temperature (C)'].min()
temp_range_2007