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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.