Advertisement
g96

Untitled

g96
Mar 19th, 2022
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. import pandas as pd
  2.  
  3. df1= pd.read_csv('Chapters.csv')
  4. chapters=df1[['Movie ID', 'Chapter ID']]
  5.  
  6. df2=pd.read_csv('Characters.csv')
  7. characters=df2[['Character ID', 'Gender']]
  8.  
  9. df3=pd.read_csv('Movies.csv')
  10. movies=df3[['Movie ID', 'Movie Title']]
  11.  
  12. df4=pd.read_csv('Dialogue.csv')
  13. dialogue=df4[['Chapter ID', 'Place ID']]
  14.  
  15. df4=pd.read_csv('Places.csv')
  16. places =df4[['Place ID', 'Place Name']]
  17.  
  18.  
  19. join = movies.merge(chapters, on = 'Movie ID') \
  20.                 .merge(dialogue, on='Chapter ID') \
  21.                 .merge(places, on = 'Place ID') \
  22.                 .merge(characters, on='Character ID')
  23.  
  24.  
  25.  
  26.  
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement