# 8.9:  DataFrame from HTML table.  Read the HTML table into a DataFrame using the .read_html()
# function.

# The function returns a list of DataFrames, one for each table found within the HTML page.
# Subscript this list to get the 1st (and only) table.
# 
# For a bonus, when reading the dataframe, set the 'EST' column to the index and use the
# parse_dates=True parameter to convert the dates in the index to date-type objects (pandas
# Timestamp.

fname = '../weather_newyork.html'

df_list = pd.read_html(fname, index_col='EST', parse_dates=True)

df = df_list[0]

print(df)

