Snowiest months

Question

You're given the following dataset, containing information about a year's worth of weather. Using this data, *calculate the percent of time it was snowing each month. Note: this will require manipulating and classifying the existing data.

To help get you started, below is code (Python) to import the dataset:

# Import libraries
%matplotlib inline
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
# Import data
weather_2012 = pd.read_csv('https://raw.githubusercontent.com/erood/interviewqs.com_code_snippets/master/Datasets/weather_2012.csv', parse_dates=True, index_col='Date/Time')
# Preview data
weather_2012.head()

Solution

Access restricted

Subscribe to premium account to see the solution.

Get premium now