text_plain_output_1.png image_output_1.png
import pandas as pd

filename = '../input/bike_sharing_hourly.csv'
data = pd.read_csv(filename)

data.isnull().sum()

data.rename(columns={'weathersit': 'weather', 'mnth': 'month', 'hr': 'hour', 'yr': 'year', 'hum': 'humidity', 'cnt': 'count'}, inplace=True)

data.dtypes

data = data.drop(['instant', 'dteday'], axis=1)
data['year'] = data.year.astype('category')
data['season'] = data.season.astype('category')
data['month'] = data.month.astype('category')
data['hour'] = data.hour.astype('category')
data['holiday'] = data.holiday.astype('category')
data['weekday'] = data.weekday.astype('category')
data['workingday'] = data.workingday.astype('category')
data['weather'] = data.weather.astype('category')
data.dtypes