Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- df1= pd.read_csv('Chapters.csv')
- chapters=df1[['Movie ID', 'Chapter ID']]
- df2=pd.read_csv('Characters.csv')
- characters=df2[['Character ID', 'Gender']]
- df3=pd.read_csv('Movies.csv')
- movies=df3[['Movie ID', 'Movie Title']]
- df4=pd.read_csv('Dialogue.csv')
- dialogue=df4[['Chapter ID', 'Place ID']]
- df4=pd.read_csv('Places.csv')
- places =df4[['Place ID', 'Place Name']]
- join = movies.merge(chapters, on = 'Movie ID') \
- .merge(dialogue, on='Chapter ID') \
- .merge(places, on = 'Place ID') \
- .merge(characters, on='Character ID')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement