Guest User

Untitled

a guest
Apr 26th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. """
  3. create DataFrame object
  4.  
  5. @author: Dazhuang
  6. """
  7. import pandas as pd
  8. music_data = [("the rolling stones","Satisfaction"),("Beatles","Let It Be"),("Guns N' Roses","Don't Cry"),("Metallica","Nothing Else Matters")]
  9. music_table = pd.DataFrame(music_data)
  10. music_table.index = range(1, 5)
  11. music_table.columns = ['singer', 'song_name']
  12. print(music_table)
Add Comment
Please, Sign In to add comment