Working on the DataFrame

Let's now move on to getting our DataFrame ready to work with:

df = pd.DataFrame(ipo_list) 
 
df.head() 

The preceding code generates the following output:

The data looks good, so let's now add our columns:

df.columns = ['Date', 'Company', 'Ticker', 'Managers', \ 
              'Offer Price', 'Opening Price', '1st Day Close',\ 
              '1st Day % Chg', '$ Chg Open', '$ Chg Close',\ 
              'Star Rating', 'Performed'] 
 
df.head() 

The preceding code generates the following output:

Let's now convert that Date column from a float to a proper date. The

Get Python Machine Learning Blueprints - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.