In [15]:
import pandas as pd
import sys
import os
sys.path.append(os.path.abspath('..'))
import flightanalysis2015.readrawdata as  rd
import flightanalysis2015.flightdelays as  fd

In [3]:
# Data file paths
airline_path = "../../data/airlines.csv"
airports_path = "../../data/airports.csv"
flights_path = "../../data/flights.csv"

In [4]:
airline_df = rd.get_data_frame(airline_path)
params = {'ORIGIN_AIRPORT': str, 'DESTINATION_AIRPORT': str}
flights_df = rd.get_data_frame(flights_path, params)

In [10]:
var = fd.compute_flight_delays(airline_df,flights_df)

In [12]:
nvar = var.unstack()

In [16]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
plt.style.use('ggplot')

nvar.plot.bar(stacked=True)



In [18]:
bars.show()


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-18-1309f23e5469> in <module>()
----> 1 bars.show()

AttributeError: 'AxesSubplot' object has no attribute 'show'

In [ ]: