CIA Factbook Data

Link to the Mission: https://app.dataquest.io/m/257/guided-project%3A-analyzing-cia-factbook-data-using-sqlite-and-python/4/histograms

My code:

q = "SELECT population, population_growth, birth_rate, death_rate  FROM facts WHERE name NOT IN ('World', 'Antarctica');"
pd.read_sql_query(q, conn).dropna().hist(figsize=(2,2))

I am not getting the required histograms, but got this as output instead:

array([[<matplotlib.axes._subplots.AxesSubplot object at 0x7fba8af5d7f0>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x7fba8aeb9a58>],
       [<matplotlib.axes._subplots.AxesSubplot object at 0x7fba8ae84a58>,
        <matplotlib.axes._subplots.AxesSubplot object at 0x7fba8ae43ef0>]],
      dtype=object)

I read the documentation, but I am still scratching my head on this. I was hoping I could run
a default plot before experimenting with the parameters.

running pd.read_sql_query(q, conn) outputs the correct dataframe.

Mike D

Hey Mike!

Did you remember to run the Jupyter magic code to allow plots to be visualized inline in the notebook?

%matplotlib inline