Learn practical skills, build real-world projects, and advance your career
Created 3 years ago
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
df = pd.read_csv('weatherHistory.csv')
df.shape
(96453, 12)
list(df.columns)
['Formatted Date',
'Summary',
'Precip Type',
'Temperature (C)',
'Apparent Temperature (C)',
'Humidity',
'Wind Speed (km/h)',
'Wind Bearing (degrees)',
'Visibility (km)',
'Loud Cover',
'Pressure (millibars)',
'Daily Summary']
df = df.drop(['Summary','Precip Type','Temperature (C)', 'Wind Speed (km/h)', 'Wind Bearing (degrees)',
'Visibility (km)','Loud Cover', 'Pressure (millibars)', 'Daily Summary'], axis=1)
df.head()
df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 96453 entries, 0 to 96452
Data columns (total 3 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 Formatted Date 96453 non-null object
1 Apparent Temperature (C) 96453 non-null float64
2 Humidity 96453 non-null float64
dtypes: float64(2), object(1)
memory usage: 2.2+ MB