text_html_output_1.png
import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import pandas as pd
import numpy as np
df = pd.read_csv('../input/szeged-weather/weatherHistory.csv')

df.isnull().sum(axis=0)

df = df.dropna(how='any', axis=0)

df.isnull().sum(axis=0)

df.iloc[:, 1].value_counts()

df.iloc[:, 1].value_counts()

summary_dict = {'Partly Cloudy': 0, 'Mostly Cloudy': 1, 'Overcast': 2, 'Clear': 3, 'Foggy': 4, 'Breezy': 5, 'Windy': 6, 'Dry': 7, 'Rain': 8, 'Humid': 9}

df.shape[0]

df = df.replace({'Summary': summary_dict})

cols_to_transform = ['Precip Type']
df_with_dummies = pd.get_dummies(df, columns=cols_to_transform, drop_first=True)
df = df_with_dummies

df.drop('Dummy', axis=1, inplace=True)

df.drop('Formatted Date', axis=1, inplace=True)

df.iloc[:, 9].value_counts()

df.iloc[:, 9].nunique()

df.isnull().sum(axis=0)

df = df.dropna(how='any', axis=0)
df.isnull().sum(axis=0)