Reading, parsing and writing a csv file

Read_Parse_Write

Project to read, parse and write a csv file:

Task#1: Load the data:

In [1]:
import csv
In [2]:
with open('Film.csv', 'r') as csv_file:
    csv_reader = csv.reader(csv_file)
    
    #Looping over the lines in the csv file:
    for line in csv_reader:
        print(line)
['', 'Title', 'Year', 'Time', 'Cast', 'Rating', 'Description', 'Origin', 'Time_code', 'Good']
['1', 'A_Ticklish_Affair', '1963', '89', '5', '2', '7', '0', 'short', '0']
['2', 'Action_in_the_North_Atlantic', '1943', '127', '7', '3', '9', '0', 'long', '1']
['3', 'And_the_Ship_Sails_On', '1984', '138', '7', '3', '15', '3', 'long', '1']
['4', 'Autumn_Sonata', '1978', '97', '5', '3', '11', '5', 'long', '1']
['5', 'Bachelor_Apartment', '1931', '77', '6', '2.5', '7', '0', 'short', '0']
['6', 'Benson_Murder_Case', '1930', '69', '8', '2.5', '10', '0', 'short', '0']
['7', 'Black_Hand', '1950', '93', '5', '3', '8', '0', 'long', '1']
['8', 'Blaze', '1989', '119', '8', '2.5', '15', '0', 'long', '0']
['9', 'Blondie_Has_Servant_Trouble', '1940', '70', '9', '2.5', '8', '0', 'short', '0']
['10', 'Blondie_in_the_Dough', '1947', '69', '9', '2', '8', '0', 'short', '0']
['11', 'Brewster_McCloud', '1970', '101', '9', '3', '11', '0', 'long', '1']
['12', 'Calling_Philo_Vance', '1940', '62', '6', '2', '10', '0', 'short', '0']
['13', 'Car_Wash', '1976', '97', '10', '2.5', '12', '0', 'long', '0']
['14', 'City_Lights', '1985', '85', '10', '1', '13', '0', 'short', '0']
['15', 'Come_Out_Fighting', '1945', '62', '9', '1.5', '9', '0', 'short', '0']
['16', 'Conflict', '1945', '86', '6', '2.5', '7', '0', 'short', '0']
['17', 'Conquest', '1937', '112', '10', '3', '10', '0', 'long', '1']
['18', 'Dakota', '1988', '97', '6', '2', '11', '0', 'long', '0']
['19', 'Deadhead_Miles', '1972', '93', '12', '2.5', '11', '0', 'long', '0']
['20', 'Divided_Heart', '1954', '89', '7', '3', '8', '1', 'short', '1']
['21', 'Evergreen', '1934', '90', '5', '3', '9', '1', 'long', '1']
['22', 'Falcon_Strikes_Back', '1943', '66', '9', '2.5', '9', '0', 'short', '0']
['23', 'Find_the_Lady', '1976', '79', '6', '1.5', '13', '1', 'short', '0']
['24', 'Five_Golden_Hours', '1961', '90', '7', '2', '9', '1', 'long', '0']
['25', 'Flash_and_the_Firecat', '1975', '84', '6', '1.5', '7', '0', 'short', '0']
['26', 'Flight', '1929', '116', '6', '2.5', '7', '0', 'long', '0']
['27', 'Four_Jills_in_a_Jeep', '1944', '89', '12', '2.5', '12', '0', 'short', '0']
['28', 'Galileo', '1973', '145', '11', '3', '13', '1', 'long', '1']
['29', 'Hambone_and_Hillie', '1984', '89', '8', '2.5', '8', '0', 'short', '0']
['30', 'Hitler--Dead_or_Alive', '1943', '70', '7', '2', '6', '0', 'short', '0']
['31', 'Hold_Back_Tomorrow', '1955', '75', '5', '1.5', '6', '0', 'short', '0']
['32', 'House_Party_3', '1994', '94', '8', '1.5', '12', '0', 'long', '0']
['33', 'It_Came_from_Outer_Space', '1953', '81', '6', '3', '12', '0', 'short', '1']
['34', "Jason's_Lyric", '1994', '119', '9', '2', '16', '0', 'long', '0']
['35', 'Jessica', '1962', '112', '6', '2.5', '7', '0', 'long', '0']
['36', 'Kit_Carson', '1940', '97', '7', '3', '8', '0', 'long', '1']
['37', 'Kronos', '1957', '78', '5', '2.5', '11', '0', 'short', '0']
['38', 'Lady_Dracula', '1973', '80', '4', '1', '8', '0', 'short', '0']
['39', 'Last_Plane_Out', '1983', '92', '6', '1.5', '12', '0', 'long', '0']
['40', 'Mad_Love', '1995', '95', '12', '1.5', '13', '0', 'long', '0']
['41', 'Manhunter', '1986', '119', '7', '3', '21', '0', 'long', '1']
['42', 'Memories_of_Me', '1988', '105', '8', '2', '13', '0', 'long', '0']
['43', 'Murder_by_Television', '1935', '60', '5', '1.5', '8', '0', 'short', '0']
['44', 'Night_of_the_Dark_Shadows', '1971', '97', '6', '1', '11', '0', 'long', '0']
['45', 'Okinawa', '1952', '67', '6', '2', '6', '0', 'short', '0']
['46', 'Once_a_Thief', '1965', '107', '7', '2', '7', '2', 'long', '0']
['47', 'One_Crazy_Summer', '1986', '93', '8', '2', '12', '0', 'long', '0']
['48', 'Our_Man_in_Havana', '1960', '107', '7', '2.5', '8', '1', 'long', '0']
['49', 'Secret_World', '1969', '94', '5', '2', '7', '2', 'long', '0']
['50', 'Secrets', '1971', '86', '6', '1.5', '10', '0', 'short', '0']
['51', 'Seminole_Uprising', '1955', '74', '4', '1.5', '5', '0', 'short', '0']
['52', 'She_Demons', '1958', '80', '5', '1', '9', '0', 'short', '0']
['53', 'Sherlock_Jr.', '1924', '45', '6', '4', '13', '0', 'short', '1']
['54', 'Shout_at_the_Devil', '1976', '119', '5', '2.5', '10', '1', 'long', '0']
['55', 'Single_Room_Furnished', '1968', '93', '7', '1.5', '10', '0', 'long', '0']
['56', 'Sleep_My_Love', '1948', '97', '8', '3', '9', '0', 'long', '1']
['57', 'Smash_Up:_The_Story_of_a_Woman', '1947', '103', '6', '3', '14', '0', 'long', '1']
['58', 'Spare_the_Rod', '1961', '93', '6', '2.5', '7', '1', 'long', '0']
['59', 'Station_West', '1948', '92', '10', '3', '12', '0', 'long', '1']
['60', 'Telefon', '1977', '102', '7', '3', '11', '0', 'long', '1']
['61', 'The_Abominable_Dr._Phibes', '1971', '94', '5', '3', '9', '1', 'long', '1']
['62', 'The_Amazing_Transparent_Man', '1960', '58', '4', '1', '10', '0', 'short', '0']
['63', 'The_Boogens', '1981', '95', '6', '1', '8', '0', 'long', '0']
['64', 'The_Boy_Who_Cried_Bitch', '1991', '101', '10', '3', '12', '0', 'long', '1']
['65', 'The_Chocolate_War', '1988', '103', '7', '3', '13', '0', 'long', '1']
['66', 'The_Cockeyed_Miracle', '1946', '81', '5', '2', '7', '0', 'short', '0']
['67', 'The_Competition', '1980', '129', '8', '3', '10', '0', 'long', '1']
['68', 'The_Curse_of_Bigfoot', '1972', '87', '3', '1', '5', '0', 'short', '0']
['69', 'The_Great_Waldo_Pepper', '1975', '107', '8', '3', '11', '0', 'long', '1']
['70', "The_Hatter's_Ghost", '1982', '120', '4', '1.5', '9', '2', 'long', '0']
['71', 'The_Judge_and_the_Assassin', '1975', '130', '5', '3.5', '9', '2', 'long', '1']
['72', 'The_Last_Valley', '1970', '128', '6', '2', '9', '1', 'long', '0']
['73', 'The_Marriage_of_a_Young_Stockbroker', '1971', '95', '6', '2.5', '14', '0', 'long', '0']
['74', 'The_Miracle_Worker', '1962', '107', '7', '3.5', '14', '0', 'long', '1']
['75', 'The_Mutineers', '1949', '60', '4', '1.5', '5', '0', 'short', '0']
['76', 'The_Raven', '1963', '86', '6', '3', '9', '0', 'short', '1']
['77', 'The_Ravine', '1969', '97', '6', '2', '7', '3', 'long', '0']
['78', 'The_Revolt_of_Job', '1983', '97', '6', '3.5', '9', '6', 'long', '1']
['79', 'The_Romantic_Age', '1949', '86', '6', '2', '7', '1', 'short', '0']
['80', 'The_Siege_at_Red_River', '1954', '81', '5', '2.5', '5', '0', 'short', '0']
['81', 'The_Stone_Boy', '1984', '93', '8', '3.5', '12', '0', 'long', '1']
['82', 'The_Strip', '1951', '85', '4', '2', '9', '0', 'short', '0']
['83', 'The_Surrogate', '1984', '95', '7', '2.5', '13', '4', 'long', '0']
['84', "The_Twinkle_in_God's_Eye", '1955', '73', '5', '2', '7', '0', 'short', '0']
['85', 'The_Ultimate_Warrior', '1975', '94', '6', '2.5', '10', '0', 'long', '0']
['86', 'The_Unholy_Three', '1930', '72', '6', '2.5', '9', '0', 'short', '0']
['87', 'The_Well', '1951', '85', '7', '3', '8', '0', 'short', '1']
['88', 'Tom_Dick_and_Harry', '1941', '86', '7', '3.5', '11', '0', 'short', '1']
['89', 'Triumph_of_the_Spirit', '1989', '121', '7', '3', '12', '0', 'long', '1']
['90', 'Uncle_Moses', '1932', '87', '7', '2.5', '16', '0', 'short', '0']
['91', 'Unsane', '1982', '100', '6', '2', '12', '3', 'long', '0']
['92', 'Valley_of_Gwangi', '1969', '95', '5', '2.5', '11', '0', 'long', '0']
['93', 'Valley_of_the_Dragons', '1961', '79', '5', '1.5', '8', '0', 'short', '0']
['94', 'Vicki', '1953', '85', '7', '2.5', '9', '0', 'short', '0']
['95', 'Volere_Volare', '1991', '92', '7', '2.5', '17', '3', 'long', '0']
['96', 'Warning_Shot', '1967', '100', '13', '3.5', '12', '0', 'long', '1']
['97', 'Whispering_Smith_vs._Scot._Yard', '1951', '77', '5', '2', '9', '1', 'short', '0']
['98', 'Windows', '1980', '96', '4', '1', '9', '0', 'long', '0']
['99', 'Windwalker', '1980', '108', '5', '2.5', '11', '0', 'long', '0']
['100', 'You_Only_Live_Twice', '1967', '116', '9', '2.5', '14', '1', 'long', '0']

Each line that we just printed out is a list of all the values.

Every value correspond to and index('Year' is index 2, ' Time' is index 3 and so on). If want only to print out the indexes, for example the index 1 which is 'Title', we can do the following:

In [3]:
with open('Film.csv', 'r') as csv_file:
    csv_reader = csv.reader(csv_file)
    
    #Looping over the lines in the csv file:
    for line in csv_reader:
        if(len(line) < 1):
            continue
        print(line[1])
        
Title
A_Ticklish_Affair
Action_in_the_North_Atlantic
And_the_Ship_Sails_On
Autumn_Sonata
Bachelor_Apartment
Benson_Murder_Case
Black_Hand
Blaze
Blondie_Has_Servant_Trouble
Blondie_in_the_Dough
Brewster_McCloud
Calling_Philo_Vance
Car_Wash
City_Lights
Come_Out_Fighting
Conflict
Conquest
Dakota
Deadhead_Miles
Divided_Heart
Evergreen
Falcon_Strikes_Back
Find_the_Lady
Five_Golden_Hours
Flash_and_the_Firecat
Flight
Four_Jills_in_a_Jeep
Galileo
Hambone_and_Hillie
Hitler--Dead_or_Alive
Hold_Back_Tomorrow
House_Party_3
It_Came_from_Outer_Space
Jason's_Lyric
Jessica
Kit_Carson
Kronos
Lady_Dracula
Last_Plane_Out
Mad_Love
Manhunter
Memories_of_Me
Murder_by_Television
Night_of_the_Dark_Shadows
Okinawa
Once_a_Thief
One_Crazy_Summer
Our_Man_in_Havana
Secret_World
Secrets
Seminole_Uprising
She_Demons
Sherlock_Jr.
Shout_at_the_Devil
Single_Room_Furnished
Sleep_My_Love
Smash_Up:_The_Story_of_a_Woman
Spare_the_Rod
Station_West
Telefon
The_Abominable_Dr._Phibes
The_Amazing_Transparent_Man
The_Boogens
The_Boy_Who_Cried_Bitch
The_Chocolate_War
The_Cockeyed_Miracle
The_Competition
The_Curse_of_Bigfoot
The_Great_Waldo_Pepper
The_Hatter's_Ghost
The_Judge_and_the_Assassin
The_Last_Valley
The_Marriage_of_a_Young_Stockbroker
The_Miracle_Worker
The_Mutineers
The_Raven
The_Ravine
The_Revolt_of_Job
The_Romantic_Age
The_Siege_at_Red_River
The_Stone_Boy
The_Strip
The_Surrogate
The_Twinkle_in_God's_Eye
The_Ultimate_Warrior
The_Unholy_Three
The_Well
Tom_Dick_and_Harry
Triumph_of_the_Spirit
Uncle_Moses
Unsane
Valley_of_Gwangi
Valley_of_the_Dragons
Vicki
Volere_Volare
Warning_Shot
Whispering_Smith_vs._Scot._Yard
Windows
Windwalker
You_Only_Live_Twice

Task#2:Write to an csv file:

With opening a new file for writing('new_film.csv'), we're creating a csv_writer variable. Then with the writer method of the csv module we will open the new file with the delimiter of the tab.

In [4]:
with open('Film.csv', 'r') as csv_file:
    csv_reader = csv.reader(csv_file)
    
    with open('new_film.csv', 'w') as new_file:
        csv_writer = csv.writer(new_file, delimiter='\t')
    
    #Writes to the new file each line that belongs to the original file
        for line in csv_reader:
            if(len(line) < 1):
                continue
            csv_writer.writerow(line)
In [5]:
with open('new_film.csv', 'r') as csv_file:
    csv_reader = csv.reader(csv_file, delimiter='\t')
    
    for line in csv_reader:
        print(line)
['', 'Title', 'Year', 'Time', 'Cast', 'Rating', 'Description', 'Origin', 'Time_code', 'Good']
[]
['1', 'A_Ticklish_Affair', '1963', '89', '5', '2', '7', '0', 'short', '0']
[]
['2', 'Action_in_the_North_Atlantic', '1943', '127', '7', '3', '9', '0', 'long', '1']
[]
['3', 'And_the_Ship_Sails_On', '1984', '138', '7', '3', '15', '3', 'long', '1']
[]
['4', 'Autumn_Sonata', '1978', '97', '5', '3', '11', '5', 'long', '1']
[]
['5', 'Bachelor_Apartment', '1931', '77', '6', '2.5', '7', '0', 'short', '0']
[]
['6', 'Benson_Murder_Case', '1930', '69', '8', '2.5', '10', '0', 'short', '0']
[]
['7', 'Black_Hand', '1950', '93', '5', '3', '8', '0', 'long', '1']
[]
['8', 'Blaze', '1989', '119', '8', '2.5', '15', '0', 'long', '0']
[]
['9', 'Blondie_Has_Servant_Trouble', '1940', '70', '9', '2.5', '8', '0', 'short', '0']
[]
['10', 'Blondie_in_the_Dough', '1947', '69', '9', '2', '8', '0', 'short', '0']
[]
['11', 'Brewster_McCloud', '1970', '101', '9', '3', '11', '0', 'long', '1']
[]
['12', 'Calling_Philo_Vance', '1940', '62', '6', '2', '10', '0', 'short', '0']
[]
['13', 'Car_Wash', '1976', '97', '10', '2.5', '12', '0', 'long', '0']
[]
['14', 'City_Lights', '1985', '85', '10', '1', '13', '0', 'short', '0']
[]
['15', 'Come_Out_Fighting', '1945', '62', '9', '1.5', '9', '0', 'short', '0']
[]
['16', 'Conflict', '1945', '86', '6', '2.5', '7', '0', 'short', '0']
[]
['17', 'Conquest', '1937', '112', '10', '3', '10', '0', 'long', '1']
[]
['18', 'Dakota', '1988', '97', '6', '2', '11', '0', 'long', '0']
[]
['19', 'Deadhead_Miles', '1972', '93', '12', '2.5', '11', '0', 'long', '0']
[]
['20', 'Divided_Heart', '1954', '89', '7', '3', '8', '1', 'short', '1']
[]
['21', 'Evergreen', '1934', '90', '5', '3', '9', '1', 'long', '1']
[]
['22', 'Falcon_Strikes_Back', '1943', '66', '9', '2.5', '9', '0', 'short', '0']
[]
['23', 'Find_the_Lady', '1976', '79', '6', '1.5', '13', '1', 'short', '0']
[]
['24', 'Five_Golden_Hours', '1961', '90', '7', '2', '9', '1', 'long', '0']
[]
['25', 'Flash_and_the_Firecat', '1975', '84', '6', '1.5', '7', '0', 'short', '0']
[]
['26', 'Flight', '1929', '116', '6', '2.5', '7', '0', 'long', '0']
[]
['27', 'Four_Jills_in_a_Jeep', '1944', '89', '12', '2.5', '12', '0', 'short', '0']
[]
['28', 'Galileo', '1973', '145', '11', '3', '13', '1', 'long', '1']
[]
['29', 'Hambone_and_Hillie', '1984', '89', '8', '2.5', '8', '0', 'short', '0']
[]
['30', 'Hitler--Dead_or_Alive', '1943', '70', '7', '2', '6', '0', 'short', '0']
[]
['31', 'Hold_Back_Tomorrow', '1955', '75', '5', '1.5', '6', '0', 'short', '0']
[]
['32', 'House_Party_3', '1994', '94', '8', '1.5', '12', '0', 'long', '0']
[]
['33', 'It_Came_from_Outer_Space', '1953', '81', '6', '3', '12', '0', 'short', '1']
[]
['34', "Jason's_Lyric", '1994', '119', '9', '2', '16', '0', 'long', '0']
[]
['35', 'Jessica', '1962', '112', '6', '2.5', '7', '0', 'long', '0']
[]
['36', 'Kit_Carson', '1940', '97', '7', '3', '8', '0', 'long', '1']
[]
['37', 'Kronos', '1957', '78', '5', '2.5', '11', '0', 'short', '0']
[]
['38', 'Lady_Dracula', '1973', '80', '4', '1', '8', '0', 'short', '0']
[]
['39', 'Last_Plane_Out', '1983', '92', '6', '1.5', '12', '0', 'long', '0']
[]
['40', 'Mad_Love', '1995', '95', '12', '1.5', '13', '0', 'long', '0']
[]
['41', 'Manhunter', '1986', '119', '7', '3', '21', '0', 'long', '1']
[]
['42', 'Memories_of_Me', '1988', '105', '8', '2', '13', '0', 'long', '0']
[]
['43', 'Murder_by_Television', '1935', '60', '5', '1.5', '8', '0', 'short', '0']
[]
['44', 'Night_of_the_Dark_Shadows', '1971', '97', '6', '1', '11', '0', 'long', '0']
[]
['45', 'Okinawa', '1952', '67', '6', '2', '6', '0', 'short', '0']
[]
['46', 'Once_a_Thief', '1965', '107', '7', '2', '7', '2', 'long', '0']
[]
['47', 'One_Crazy_Summer', '1986', '93', '8', '2', '12', '0', 'long', '0']
[]
['48', 'Our_Man_in_Havana', '1960', '107', '7', '2.5', '8', '1', 'long', '0']
[]
['49', 'Secret_World', '1969', '94', '5', '2', '7', '2', 'long', '0']
[]
['50', 'Secrets', '1971', '86', '6', '1.5', '10', '0', 'short', '0']
[]
['51', 'Seminole_Uprising', '1955', '74', '4', '1.5', '5', '0', 'short', '0']
[]
['52', 'She_Demons', '1958', '80', '5', '1', '9', '0', 'short', '0']
[]
['53', 'Sherlock_Jr.', '1924', '45', '6', '4', '13', '0', 'short', '1']
[]
['54', 'Shout_at_the_Devil', '1976', '119', '5', '2.5', '10', '1', 'long', '0']
[]
['55', 'Single_Room_Furnished', '1968', '93', '7', '1.5', '10', '0', 'long', '0']
[]
['56', 'Sleep_My_Love', '1948', '97', '8', '3', '9', '0', 'long', '1']
[]
['57', 'Smash_Up:_The_Story_of_a_Woman', '1947', '103', '6', '3', '14', '0', 'long', '1']
[]
['58', 'Spare_the_Rod', '1961', '93', '6', '2.5', '7', '1', 'long', '0']
[]
['59', 'Station_West', '1948', '92', '10', '3', '12', '0', 'long', '1']
[]
['60', 'Telefon', '1977', '102', '7', '3', '11', '0', 'long', '1']
[]
['61', 'The_Abominable_Dr._Phibes', '1971', '94', '5', '3', '9', '1', 'long', '1']
[]
['62', 'The_Amazing_Transparent_Man', '1960', '58', '4', '1', '10', '0', 'short', '0']
[]
['63', 'The_Boogens', '1981', '95', '6', '1', '8', '0', 'long', '0']
[]
['64', 'The_Boy_Who_Cried_Bitch', '1991', '101', '10', '3', '12', '0', 'long', '1']
[]
['65', 'The_Chocolate_War', '1988', '103', '7', '3', '13', '0', 'long', '1']
[]
['66', 'The_Cockeyed_Miracle', '1946', '81', '5', '2', '7', '0', 'short', '0']
[]
['67', 'The_Competition', '1980', '129', '8', '3', '10', '0', 'long', '1']
[]
['68', 'The_Curse_of_Bigfoot', '1972', '87', '3', '1', '5', '0', 'short', '0']
[]
['69', 'The_Great_Waldo_Pepper', '1975', '107', '8', '3', '11', '0', 'long', '1']
[]
['70', "The_Hatter's_Ghost", '1982', '120', '4', '1.5', '9', '2', 'long', '0']
[]
['71', 'The_Judge_and_the_Assassin', '1975', '130', '5', '3.5', '9', '2', 'long', '1']
[]
['72', 'The_Last_Valley', '1970', '128', '6', '2', '9', '1', 'long', '0']
[]
['73', 'The_Marriage_of_a_Young_Stockbroker', '1971', '95', '6', '2.5', '14', '0', 'long', '0']
[]
['74', 'The_Miracle_Worker', '1962', '107', '7', '3.5', '14', '0', 'long', '1']
[]
['75', 'The_Mutineers', '1949', '60', '4', '1.5', '5', '0', 'short', '0']
[]
['76', 'The_Raven', '1963', '86', '6', '3', '9', '0', 'short', '1']
[]
['77', 'The_Ravine', '1969', '97', '6', '2', '7', '3', 'long', '0']
[]
['78', 'The_Revolt_of_Job', '1983', '97', '6', '3.5', '9', '6', 'long', '1']
[]
['79', 'The_Romantic_Age', '1949', '86', '6', '2', '7', '1', 'short', '0']
[]
['80', 'The_Siege_at_Red_River', '1954', '81', '5', '2.5', '5', '0', 'short', '0']
[]
['81', 'The_Stone_Boy', '1984', '93', '8', '3.5', '12', '0', 'long', '1']
[]
['82', 'The_Strip', '1951', '85', '4', '2', '9', '0', 'short', '0']
[]
['83', 'The_Surrogate', '1984', '95', '7', '2.5', '13', '4', 'long', '0']
[]
['84', "The_Twinkle_in_God's_Eye", '1955', '73', '5', '2', '7', '0', 'short', '0']
[]
['85', 'The_Ultimate_Warrior', '1975', '94', '6', '2.5', '10', '0', 'long', '0']
[]
['86', 'The_Unholy_Three', '1930', '72', '6', '2.5', '9', '0', 'short', '0']
[]
['87', 'The_Well', '1951', '85', '7', '3', '8', '0', 'short', '1']
[]
['88', 'Tom_Dick_and_Harry', '1941', '86', '7', '3.5', '11', '0', 'short', '1']
[]
['89', 'Triumph_of_the_Spirit', '1989', '121', '7', '3', '12', '0', 'long', '1']
[]
['90', 'Uncle_Moses', '1932', '87', '7', '2.5', '16', '0', 'short', '0']
[]
['91', 'Unsane', '1982', '100', '6', '2', '12', '3', 'long', '0']
[]
['92', 'Valley_of_Gwangi', '1969', '95', '5', '2.5', '11', '0', 'long', '0']
[]
['93', 'Valley_of_the_Dragons', '1961', '79', '5', '1.5', '8', '0', 'short', '0']
[]
['94', 'Vicki', '1953', '85', '7', '2.5', '9', '0', 'short', '0']
[]
['95', 'Volere_Volare', '1991', '92', '7', '2.5', '17', '3', 'long', '0']
[]
['96', 'Warning_Shot', '1967', '100', '13', '3.5', '12', '0', 'long', '1']
[]
['97', 'Whispering_Smith_vs._Scot._Yard', '1951', '77', '5', '2', '9', '1', 'short', '0']
[]
['98', 'Windows', '1980', '96', '4', '1', '9', '0', 'long', '0']
[]
['99', 'Windwalker', '1980', '108', '5', '2.5', '11', '0', 'long', '0']
[]
['100', 'You_Only_Live_Twice', '1967', '116', '9', '2.5', '14', '1', 'long', '0']
[]

Task#3:Procesing the Film.csv using the dictionary reader:

In [6]:
with open('Film.csv', 'r') as csv_file:
    csv_reader = csv.DictReader(csv_file)
    
    #Looping over the lines in the csv file:
    for line in csv_reader:
        print(line)
OrderedDict([('', '1'), ('Title', 'A_Ticklish_Affair'), ('Year', '1963'), ('Time', '89'), ('Cast', '5'), ('Rating', '2'), ('Description', '7'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '2'), ('Title', 'Action_in_the_North_Atlantic'), ('Year', '1943'), ('Time', '127'), ('Cast', '7'), ('Rating', '3'), ('Description', '9'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '3'), ('Title', 'And_the_Ship_Sails_On'), ('Year', '1984'), ('Time', '138'), ('Cast', '7'), ('Rating', '3'), ('Description', '15'), ('Origin', '3'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '4'), ('Title', 'Autumn_Sonata'), ('Year', '1978'), ('Time', '97'), ('Cast', '5'), ('Rating', '3'), ('Description', '11'), ('Origin', '5'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '5'), ('Title', 'Bachelor_Apartment'), ('Year', '1931'), ('Time', '77'), ('Cast', '6'), ('Rating', '2.5'), ('Description', '7'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '6'), ('Title', 'Benson_Murder_Case'), ('Year', '1930'), ('Time', '69'), ('Cast', '8'), ('Rating', '2.5'), ('Description', '10'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '7'), ('Title', 'Black_Hand'), ('Year', '1950'), ('Time', '93'), ('Cast', '5'), ('Rating', '3'), ('Description', '8'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '8'), ('Title', 'Blaze'), ('Year', '1989'), ('Time', '119'), ('Cast', '8'), ('Rating', '2.5'), ('Description', '15'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '9'), ('Title', 'Blondie_Has_Servant_Trouble'), ('Year', '1940'), ('Time', '70'), ('Cast', '9'), ('Rating', '2.5'), ('Description', '8'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '10'), ('Title', 'Blondie_in_the_Dough'), ('Year', '1947'), ('Time', '69'), ('Cast', '9'), ('Rating', '2'), ('Description', '8'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '11'), ('Title', 'Brewster_McCloud'), ('Year', '1970'), ('Time', '101'), ('Cast', '9'), ('Rating', '3'), ('Description', '11'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '12'), ('Title', 'Calling_Philo_Vance'), ('Year', '1940'), ('Time', '62'), ('Cast', '6'), ('Rating', '2'), ('Description', '10'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '13'), ('Title', 'Car_Wash'), ('Year', '1976'), ('Time', '97'), ('Cast', '10'), ('Rating', '2.5'), ('Description', '12'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '14'), ('Title', 'City_Lights'), ('Year', '1985'), ('Time', '85'), ('Cast', '10'), ('Rating', '1'), ('Description', '13'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '15'), ('Title', 'Come_Out_Fighting'), ('Year', '1945'), ('Time', '62'), ('Cast', '9'), ('Rating', '1.5'), ('Description', '9'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '16'), ('Title', 'Conflict'), ('Year', '1945'), ('Time', '86'), ('Cast', '6'), ('Rating', '2.5'), ('Description', '7'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '17'), ('Title', 'Conquest'), ('Year', '1937'), ('Time', '112'), ('Cast', '10'), ('Rating', '3'), ('Description', '10'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '18'), ('Title', 'Dakota'), ('Year', '1988'), ('Time', '97'), ('Cast', '6'), ('Rating', '2'), ('Description', '11'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '19'), ('Title', 'Deadhead_Miles'), ('Year', '1972'), ('Time', '93'), ('Cast', '12'), ('Rating', '2.5'), ('Description', '11'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '20'), ('Title', 'Divided_Heart'), ('Year', '1954'), ('Time', '89'), ('Cast', '7'), ('Rating', '3'), ('Description', '8'), ('Origin', '1'), ('Time_code', 'short'), ('Good', '1')])
OrderedDict([('', '21'), ('Title', 'Evergreen'), ('Year', '1934'), ('Time', '90'), ('Cast', '5'), ('Rating', '3'), ('Description', '9'), ('Origin', '1'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '22'), ('Title', 'Falcon_Strikes_Back'), ('Year', '1943'), ('Time', '66'), ('Cast', '9'), ('Rating', '2.5'), ('Description', '9'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '23'), ('Title', 'Find_the_Lady'), ('Year', '1976'), ('Time', '79'), ('Cast', '6'), ('Rating', '1.5'), ('Description', '13'), ('Origin', '1'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '24'), ('Title', 'Five_Golden_Hours'), ('Year', '1961'), ('Time', '90'), ('Cast', '7'), ('Rating', '2'), ('Description', '9'), ('Origin', '1'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '25'), ('Title', 'Flash_and_the_Firecat'), ('Year', '1975'), ('Time', '84'), ('Cast', '6'), ('Rating', '1.5'), ('Description', '7'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '26'), ('Title', 'Flight'), ('Year', '1929'), ('Time', '116'), ('Cast', '6'), ('Rating', '2.5'), ('Description', '7'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '27'), ('Title', 'Four_Jills_in_a_Jeep'), ('Year', '1944'), ('Time', '89'), ('Cast', '12'), ('Rating', '2.5'), ('Description', '12'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '28'), ('Title', 'Galileo'), ('Year', '1973'), ('Time', '145'), ('Cast', '11'), ('Rating', '3'), ('Description', '13'), ('Origin', '1'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '29'), ('Title', 'Hambone_and_Hillie'), ('Year', '1984'), ('Time', '89'), ('Cast', '8'), ('Rating', '2.5'), ('Description', '8'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '30'), ('Title', 'Hitler--Dead_or_Alive'), ('Year', '1943'), ('Time', '70'), ('Cast', '7'), ('Rating', '2'), ('Description', '6'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '31'), ('Title', 'Hold_Back_Tomorrow'), ('Year', '1955'), ('Time', '75'), ('Cast', '5'), ('Rating', '1.5'), ('Description', '6'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '32'), ('Title', 'House_Party_3'), ('Year', '1994'), ('Time', '94'), ('Cast', '8'), ('Rating', '1.5'), ('Description', '12'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '33'), ('Title', 'It_Came_from_Outer_Space'), ('Year', '1953'), ('Time', '81'), ('Cast', '6'), ('Rating', '3'), ('Description', '12'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '1')])
OrderedDict([('', '34'), ('Title', "Jason's_Lyric"), ('Year', '1994'), ('Time', '119'), ('Cast', '9'), ('Rating', '2'), ('Description', '16'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '35'), ('Title', 'Jessica'), ('Year', '1962'), ('Time', '112'), ('Cast&##39;, '6'), ('Rating', '2.5'), ('Description', '7'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '36'), ('Title', 'Kit_Carson'), ('Year', '1940'), ('Time', '97'), ('Cast', '7'), ('Rating', '3'), ('Description', '8'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '37'), ('Title', 'Kronos'), ('Year', '1957'), ('Time', '78'), ('Cast', '5'), ('Rating', '2.5'), ('Description', '11'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '38'), ('Title', 'Lady_Dracula'), ('Year', '1973'), ('Time', '80'), ('Cast', '4'), ('Rating', '1'), ('Description', '8'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '39'), ('Title', 'Last_Plane_Out'), ('Year', '1983'), ('Time', '92'), ('Cast', '6'), ('Rating', '1.5'), ('Description', '12'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '40'), ('Title', 'Mad_Love'), ('Year', '1995'), ('Time', '95'), ('Cast', '12'), ('Rating', '1.5'), ('Description', '13'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '41'), ('Title', 'Manhunter'), ('Year', '1986'), ('Time', '119'), ('Cast', '7'), ('Rating', '3'), ('Description', '21'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '42'), ('Title', 'Memories_of_Me'), ('Year', '1988'), ('Time', '105'), ('Cast', '8'), ('Rating', '2'), ('Description', '13'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '43'), ('Title', 'Murder_by_Television'), ('Year', '1935'), ('Time', '60'), ('Cast', '5'), ('Rating', '1.5'), ('Description', '8'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '44'), ('Title', 'Night_of_the_Dark_Shadows'), ('Year', '1971'), ('Time', '97'), ('Cast', '6'), ('Rating', '1'), ('Description', '11'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '45'), ('Title', 'Okinawa'), ('Year', '1952'), ('Time', '67'), ('Cast', '6'), ('Rating', '2'), ('Description', '6'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '46'), ('Title', 'Once_a_Thief'), ('Year', '1965'), ('Time', '107'), ('Cast', '7'), ('Rating', '2'), ('Description', '7'), ('Origin', '2'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '47'), ('Title', 'One_Crazy_Summer'), ('Year', '1986'), ('Time', '93'), ('Cast', '8'), ('Rating', '2'), ('Description', '12'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '48'), ('Title', 'Our_Man_in_Havana'), ('Year', '1960'), ('Time', '107'), ('Cast', '7'), ('Rating', '2.5'), ('Description', '8'), ('Origin', '1'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '49'), ('Title', 'Secret_World'), ('Year', '1969'), ('Time', '94'), ('Cast', '5'), ('Rating', '2'), ('Description', '7'), ('Origin', '2'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '50'), ('Title', 'Secrets'), ('Year', '1971'), ('Time', '86'), ('Cast', '6'), ('Rating', '1.5'), ('Description', '10'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '51'), ('Title', 'Seminole_Uprising'), ('Year', '1955'), ('Time', '74'), ('Cast', '4'), ('Rating', '1.5'), ('Description', '5'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '52'), ('Title', 'She_Demons'), ('Year', '1958'), ('Time', '80'), ('Cast', '5'), ('Rating', '1'), ('Description', '9'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '53'), ('Title', 'Sherlock_Jr.'), ('Year', '1924'), ('Time', '45'), ('Cast', '6'), ('Rating', '4'), ('Description', '13'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '1')])
OrderedDict([('', '54'), ('Title', 'Shout_at_the_Devil'), ('Year', '1976'), ('Time', '119'), ('Cast', '5'), ('Rating', '2.5'), ('Description', '10'), ('Origin', '1'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '55'), ('Title', 'Single_Room_Furnished'), ('Year', '1968'), ('Time', '93'), ('Cast', '7'), ('Rating', '1.5'), ('Description', '10'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '56'), ('Title', 'Sleep_My_Love'), ('Year', '1948'), ('Time', '97'), ('Cast', '8'), ('Rating', '3'), ('Description', '9'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '57'), ('Title', 'Smash_Up:_The_Story_of_a_Woman'), ('Year', '1947'), ('Time', '103'), ('Cast', '6'), ('Rating', '3'), ('Description', '14'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '58'), ('Title', 'Spare_the_Rod'), ('Year', '1961'), ('Time', '93'), ('Cast', '6'), ('Rating', '2.5'), ('Description', '7'), ('Origin', '1'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '59'), ('Title', 'Station_West'), ('Year', '1948'), ('Time', '92'), ('Cast', '10'), ('Rating', '3'), ('Description', '12'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '60'), ('Title', 'Telefon'), ('Year', '1977'), ('Time', '102'), ('Cast', '7'), ('Rating', '3'), ('Description', '11'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '61'), ('Title', 'The_Abominable_Dr._Phibes'), ('Year', '1971'), ('Time', '94'), ('Cast', '5'), ('Rating', '3'), ('Description', '9'), ('Origin', '1'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '62'), ('Title', 'The_Amazing_Transparent_Man'), ('Year', '1960'), ('Time', '58'), ('Cast', '4'), ('Rating', '1'), ('Description', '10'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '63'), ('Title', 'The_Boogens'), ('Year', '1981'), ('Time', '95'), ('Cast', '6'), ('Rating', '1'), ('Description', '8'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '64'), ('Title', 'The_Boy_Who_Cried_Bitch'), ('Year', '1991'), ('Time', '101'), ('Cast', '10'), ('Rating', '3'), ('Description', '12'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '65'), ('Title', 'The_Chocolate_War'), ('Year', '1988'), ('Time', '103'), ('Cast', '7'), ('Rating', '3'), ('Description', '13'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '66'), ('Title', 'The_Cockeyed_Miracle'), ('Year', '1946'), ('Time', '81'), ('Cast', '5'), ('Rating', '2'), ('Description', '7'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '67'), ('Title', 'The_Competition'), ('Year', '1980'), ('Time', '129'), ('Cast', '8'), ('Rating', '3'), ('Description', '10'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '68'), ('Title', 'The_Curse_of_Bigfoot'), ('Year', '1972'), ('Time', '87'), ('Cast', '3'), ('Rating', '1'), ('Description', '5'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '69'), ('Title', 'The_Great_Waldo_Pepper'), ('Year', '1975'), ('Time', '107'), ('Cast', '8'), ('Rating', '3'), ('Description', '11'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '70'), ('Title', "The_Hatter's_Ghost"), ('Year', '1982'), ('Time', '120'), ('Cast', '4'), ('Rating', '1.5'), ('Description', '9'), ('Origin', '2'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '71'), ('Title', 'The_Judge_and_the_Assassin'), ('Year', '1975'), ('Time', '130'), ('Cast', '5'), ('Rating', '3.5'), ('Description', '9'), ('Origin', '2'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '72'), ('Title', 'The_Last_Valley'), ('Year', '1970'), ('Time', '128'), ('Cast', '6'), ('Rating', '2'), ('Description', '9'), ('Origin', '1'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '73'), ('Title', 'The_Marriage_of_a_Young_Stockbroker'), ('Year', '1971'), ('Time', '95'), ('Cast', '6'), ('Rating', '2.5'), ('Description', '14'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '74'), ('Title', 'The_Miracle_Worker'), ('Year', '1962'), ('Time', '107'), ('Cast', '7'), ('Rating', '3.5'), ('Description', '14'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '75'), ('Title', 'The_Mutineers'), ('Year', '1949'), ('Time', '60'), ('Cast', '4'), ('Rating', '1.5'), ('Description', '5'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '76'), ('Title', 'The_Raven'), ('Year', '1963'), ('Time', '86'), ('Cast', '6'), ('Rating', '3'), ('Description', '9'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '1')])
OrderedDict([('', '77'), ('Title', 'The_Ravine'), ('Year', '1969'), ('Time', '97'), ('Cast', '6'), ('Rating', '2'), ('Description', '7'), ('Origin', '3'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '78'), ('Title', 'The_Revolt_of_Job'), ('Year', '1983'), ('Time', '97'), ('Cast', '6'), ('Rating', '3.5'), ('Description', '9'), ('Origin', '6'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '79'), ('Title', 'The_Romantic_Age'), ('Year', '1949'), ('Time', '86'), ('Cast', '6'), ('Rating', '2'), ('Description', '7'), ('Origin', '1'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '80'), ('Title', 'The_Siege_at_Red_River'), ('Year', '1954'), ('Time', '81'), ('Cast', '5'), ('Rating', '2.5'), ('Description', '5'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '81'), ('Title', 'The_Stone_Boy'), ('Year', '1984'), ('Time', '93'), ('Cast', '8'), ('Rating', '3.5'), ('Description', '12'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '82'), ('Title', 'The_Strip'), ('Year', '1951'), ('Time', '85'), ('Cast', '4'), ('Rating', '2'), ('Description', '9'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '83'), ('Title', 'The_Surrogate'), ('Year', '1984'), ('Time', '95'), ('Cast', '7'), ('Rating', '2.5'), ('Description', '13'), ('Origin', '4'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '84'), ('Title', "The_Twinkle_in_God's_Eye"), ('Year', '1955'), ('Time', '73'), ('Cast', '5'), ('Rating', '2'), ('Description', '7'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '85'), ('Title', 'The_Ultimate_Warrior'), ('Year', '1975'), ('Time', '94'), ('Cast', '6'), ('Rating', '2.5'), ('Description', '10'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '86'), ('Title', 'The_Unholy_Three'), ('Year', '1930'), ('Time', '72'), ('Cast', '6'), ('Rating', '2.5'), ('Description', '9'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '87'), ('Title', 'The_Well'), ('Year', '1951'), ('Time', '85'), ('Cast', '7'), ('Rating', '3'), ('Description', '8'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '1')])
OrderedDict([('', '88'), ('Title', 'Tom_Dick_and_Harry'), ('Year', '1941'), ('Time', '86'), ('Cast', '7'), ('Rating', '3.5'), ('Description', '11'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '1')])
OrderedDict([('', '89'), ('Title', 'Triumph_of_the_Spirit'), ('Year', '1989'), ('Time', '121'), ('Cast', '7'), ('Rating', '3'), ('Description', '12'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '90'), ('Title', 'Uncle_Moses'), ('Year', '1932'), ('Time', '87'), ('Cast', '7'), ('Rating', '2.5'), ('Description', '16'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '91'), ('Title', 'Unsane'), ('Year', '1982'), ('Time', '100'), ('Cast', '6'), ('Rating', '2'), ('Description', '12'), ('Origin', '3'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '92'), ('Title', 'Valley_of_Gwangi'), ('Year', '1969'), ('Time', '95'), ('Cast', '5'), ('Rating', '2.5'), ('Description', '11'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '93'), ('Title', 'Valley_of_the_Dragons'), ('Year', '1961'), ('Time', '79'), ('Cast', '5'), ('Rating', '1.5'), ('Description', '8'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '94'), ('Title', 'Vicki'), ('Year', '1953'), ('Time', '85'), ('Cast', '7'), ('Rating', '2.5'), ('Description', '9'), ('Origin', '0'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '95'), ('Title', 'Volere_Volare'), ('Year', '1991'), ('Time', '92'), ('Cast', '7'), ('Rating', '2.5'), ('Description', '17'), ('Origin', '3'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '96'), ('Title', 'Warning_Shot'), ('Year', '1967'), ('Time', '100'), ('Cast', '13'), ('Rating', '3.5'), ('Description', '12'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '1')])
OrderedDict([('', '97'), ('Title', 'Whispering_Smith_vs._Scot._Yard'), ('Year', '1951'), ('Time', '77'), ('Cast', '5'), ('Rating', '2'), ('Description', '9'), ('Origin', '1'), ('Time_code', 'short'), ('Good', '0')])
OrderedDict([('', '98'), ('Title', 'Windows'), ('Year', '1980'), ('Time', '96'), ('Cast', '4'), ('Rating', '1'), ('Description', '9'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '99'), ('Title', 'Windwalker'), ('Year', '1980'), ('Time', '108'), ('Cast', '5'), ('Rating', '2.5'), ('Description', '11'), ('Origin', '0'), ('Time_code', 'long'), ('Good', '0')])
OrderedDict([('', '100'), ('Title', 'You_Only_Live_Twice'), ('Year', '1967'), ('Time', '116'), ('Cast', '9'), ('Rating', '2.5'), ('Description', '14'), ('Origin', '1'), ('Time_code', 'long'), ('Good', '0')])

When using the DictReader method is pretty easy to parse out the information that we need. Since the field names are now dictionary keys, we can do the following to obtain the 'Time_code' of that specific line:

In [7]:
with open('Film.csv', 'r') as csv_file:
    csv_reader = csv.DictReader(csv_file)
    
    #Looping over the lines in the csv file:
    for line in csv_reader:
        print(line['Time_code'])
short
long
long
long
short
short
long
long
short
short
long
short
long
short
short
short
long
long
long
short
long
short
short
long
short
long
short
long
short
short
short
long
short
long
long
long
short
short
long
long
long
long
short
long
short
long
long
long
long
short
short
short
short
long
long
long
long
long
long
long
long
short
long
long
long
short
long
short
long
long
long
long
long
long
short
short
long
long
short
short
long
short
long
short
long
short
short
short
long
short
long
long
short
short
long
long
short
long
long
long

Task#3:Procesing the Film.csv file using the dictionary writer:

With the dictionary writer, we need to provide the field names of our file:

In [8]:
with open('Film.csv', 'r') as csv_file:
    csv_reader = csv.DictReader(csv_file)
    
    with open('new_film_dict.csv', 'w') as new_file:
        fieldnames = ['', 'Title', 'Year', 'Time', 'Cast', 'Rating', 'Description', 'Origin', 'Time_code', 'Good']
        csv_writer = csv.DictWriter(new_file, fieldnames=fieldnames, delimiter='\t')
        
        #Writes field names as header
        csv_writer.writeheader()
        
        for line in csv_reader:
            if(len(line) < 1):
                continue
            csv_writer.writerow(line)
In [9]:
with open('new_film_dict.csv', 'r') as csv_file:
    csv_reader = csv.reader(csv_file, delimiter='\t')
    
    for line in csv_reader:
        print(line)
['', 'Title', 'Year', 'Time', 'Cast', 'Rating', 'Description', 'Origin', 'Time_code', 'Good']
[]
['1', 'A_Ticklish_Affair', '1963', '89', '5', '2', '7', '0', 'short', '0']
[]
['2', 'Action_in_the_North_Atlantic', '1943', '127', '7', '3', '9', '0', 'long', '1']
[]
['3', 'And_the_Ship_Sails_On', '1984', '138', '7', '3', '15', '3', 'long', '1']
[]
['4', 'Autumn_Sonata', '1978', '97', '5', '3', '11', '5', 'long', '1']
[]
['5', 'Bachelor_Apartment', '1931', '77', '6', '2.5', '7', '0', 'short', '0']
[]
['6', 'Benson_Murder_Case', '1930', '69', '8', '2.5', '10', '0', 'short', '0']
[]
['7', 'Black_Hand', '1950', '93', '5', '3', '8', '0', 'long', '1']
[]
['8', 'Blaze', '1989', '119', '8', '2.5', '15', '0', 'long', '0']
[]
['9', 'Blondie_Has_Servant_Trouble', '1940', '70', '9', '2.5', '8', '0', 'short', '0']
[]
['10', 'Blondie_in_the_Dough', '1947', '69', '9', '2', '8', '0', 'short', '0']
[]
['11', 'Brewster_McCloud', '1970', '101', '9', '3', '11', '0', 'long', '1']
[]
['12', 'Calling_Philo_Vance', '1940', '62', '6', '2', '10', '0', 'short', '0']
[]
['13', 'Car_Wash', '1976', '97', '10', '2.5', '12', '0', 'long', '0']
[]
['14', 'City_Lights', '1985', '85', '10', '1', '13', '0', 'short', '0']
[]
['15', 'Come_Out_Fighting', '1945', '62', '9', '1.5', '9', '0', 'short', '0']
[]
['16', 'Conflict', '1945', '86', '6', '2.5', '7', '0', 'short', '0']
[]
['17', 'Conquest', '1937', '112', '10', '3', '10', '0', 'long', '1']
[]
['18', 'Dakota', '1988', '97', '6', '2', '11', '0', 'long', '0']
[]
['19', 'Deadhead_Miles', '1972', '93', '12', '2.5', '11', '0', 'long', '0']
[]
['20', 'Divided_Heart', '1954', '89', '7', '3', '8', '1', 'short', '1']
[]
['21', 'Evergreen', '1934', '90', '5', '3', '9', '1', 'long', '1']
[]
['22', 'Falcon_Strikes_Back', '1943', '66', '9', '2.5', '9', '0', 'short', '0']
[]
['23', 'Find_the_Lady', '1976', '79', '6', '1.5', '13', '1', 'short', '0']
[]
['24', 'Five_Golden_Hours', '1961', '90', '7', '2', '9', '1', 'long', '0']
[]
['25', 'Flash_and_the_Firecat', '1975', '84', '6', '1.5', '7', '0', 'short', '0']
[]
['26', 'Flight', '1929', '116', '6', '2.5', '7', '0', 'long', '0']
[]
['27', 'Four_Jills_in_a_Jeep', '1944', '89', '12', '2.5', '12', '0', 'short', '0']
[]
['28', 'Galileo', '1973', '145', '11', '3', '13', '1', 'long', '1']
[]
['29', 'Hambone_and_Hillie', '1984', '89', '8', '2.5', '8', '0', 'short', '0']
[]
['30', 'Hitler--Dead_or_Alive', '1943', '70', '7', '2', '6', '0', 'short', '0']
[]
['31', 'Hold_Back_Tomorrow', '1955', '75', '5', '1.5', '6', '0', 'short', '0']
[]
['32', 'House_Party_3', '1994', '94', '8', '1.5', '12', '0', 'long', '0']
[]
['33', 'It_Came_from_Outer_Space', '1953', '81', '6', '3', '12', '0', 'short', '1']
[]
['34', "Jason's_Lyric", '1994', '119', '9', '2', '16', '0', 'long', '0']
[]
['35', 'Jessica', '1962', '112', '6', '2.5', '7', '0', 'long', '0']
[]
['36', 'Kit_Carson', '1940', '97', '7', '3', '8', '0', 'long', '1']
[]
['37', 'Kronos', '1957', '78', '5', '2.5', '11', '0', 'short', '0']
[]
['38', 'Lady_Dracula', '1973', '80', '4', '1', '8', '0', 'short', '0']
[]
['39', 'Last_Plane_Out', '1983', '92', '6', '1.5', '12', '0', 'long', '0']
[]
['40', 'Mad_Love', '1995', '95', '12', '1.5', '13', '0', 'long', '0']
[]
['41', 'Manhunter', '1986', '119', '7', '3', '21', '0', 'long', '1']
[]
['42', 'Memories_of_Me', '1988', '105', '8', '2', '13', '0', 'long', '0']
[]
['43', 'Murder_by_Television', '1935', '60', '5', '1.5', '8', '0', 'short', '0']
[]
['44', 'Night_of_the_Dark_Shadows', '1971', '97', '6', '1', '11', '0', 'long', '0']
[]
['45', 'Okinawa', '1952', '67', '6', '2', '6', '0', 'short', '0']
[]
['46', 'Once_a_Thief', '1965', '107', '7', '2', '7', '2', 'long', '0']
[]
['47', 'One_Crazy_Summer', '1986', '93', '8', '2', '12', '0', 'long', '0']
[]
['48', 'Our_Man_in_Havana', '1960', '107', '7', '2.5', '8', '1', 'long', '0']
[]
['49', 'Secret_World', '1969', '94', '5', '2', '7', '2', 'long', '0']
[]
['50', 'Secrets', '1971', '86', '6', '1.5', '10', '0', 'short', '0']
[]
['51', 'Seminole_Uprising', '1955', '74', '4', '1.5', '5', '0', 'short', '0']
[]
['52', 'She_Demons', '1958', '80', '5', '1', '9', '0', 'short', '0']
[]
['53', 'Sherlock_Jr.', '1924', '45', '6', '4', '13', '0', 'short', '1']
[]
['54', 'Shout_at_the_Devil', '1976', '119', '5', '2.5', '10', '1', 'long', '0']
[]
['55', 'Single_Room_Furnished', '1968', '93', '7', '1.5', '10', '0', 'long', '0']
[]
['56', 'Sleep_My_Love', '1948', '97', '8', '3', '9', '0', 'long', '1']
[]
['57', 'Smash_Up:_The_Story_of_a_Woman', '1947', '103', '6', '3', '14', '0', 'long', '1']
[]
['58', 'Spare_the_Rod', '1961', '93', '6', '2.5', '7', '1', 'long', '0']
[]
['59', 'Station_West', '1948', '92', '10', '3', '12', '0', 'long', '1']
[]
['60', 'Telefon', '1977', '102', '7', '3', '11', '0', 'long', '1']
[]
['61', 'The_Abominable_Dr._Phibes', '1971', '94', '5', '3', '9', '1', 'long', '1']
[]
['62', 'The_Amazing_Transparent_Man', '1960', '58', '4', '1', '10', '0', 'short', '0']
[]
['63', 'The_Boogens', '1981', '95', '6', '1', '8', '0', 'long', '0']
[]
['64', 'The_Boy_Who_Cried_Bitch', '1991', '101', '10', '3', '12', '0', 'long', '1']
[]
['65', 'The_Chocolate_War', '1988', '103', '7', '3', '13', '0', 'long', '1']
[]
['66', 'The_Cockeyed_Miracle', '1946', '81', '5', '2', '7', '0', 'short', '0']
[]
['67', 'The_Competition', '1980', '129', '8', '3', '10', '0', 'long', '1']
[]
['68', 'The_Curse_of_Bigfoot', '1972', '87', '3', '1', '5', '0', 'short', '0']
[]
['69', 'The_Great_Waldo_Pepper', '1975', '107', '8', '3', '11', '0', 'long', '1']
[]
['70', "The_Hatter's_Ghost", '1982', '120', '4', '1.5', '9', '2', 'long', '0']
[]
['71', 'The_Judge_and_the_Assassin', '1975', '130', '5', '3.5', '9', '2', 'long', '1']
[]
['72', 'The_Last_Valley', '1970', '128', '6', '2', '9', '1', 'long', '0']
[]
['73', 'The_Marriage_of_a_Young_Stockbroker', '1971', '95', '6', '2.5', '14', '0', 'long', '0']
[]
['74', 'The_Miracle_Worker', '1962', '107', '7', '3.5', '14', '0', 'long', '1']
[]
['75', 'The_Mutineers', '1949', '60', '4', '1.5', '5', '0', 'short', '0']
[]
['76', 'The_Raven', '1963', '86', '6', '3', '9', '0', 'short', '1']
[]
['77', 'The_Ravine', '1969', '97', '6', '2', '7', '3', 'long', '0']
[]
['78', 'The_Revolt_of_Job', '1983', '97', '6', '3.5', '9', '6', 'long', '1']
[]
['79', 'The_Romantic_Age', '1949', '86', '6', '2', '7', '1', 'short', '0']
[]
['80', 'The_Siege_at_Red_River', '1954', '81', '5', '2.5', '5', '0', 'short', '0']
[]
['81', 'The_Stone_Boy', '1984', '93', '8', '3.5', '12', '0', 'long', '1']
[]
['82', 'The_Strip', '1951', '85', '4', '2', '9', '0', 'short', '0']
[]
['83', 'The_Surrogate', '1984', '95', '7', '2.5', '13', '4', 'long', '0']
[]
['84', "The_Twinkle_in_God's_Eye", '1955', '73', '5', '2', '7', '0', 'short', '0']
[]
['85', 'The_Ultimate_Warrior', '1975', '94', '6', '2.5', '10', '0', 'long', '0']
[]
['86', 'The_Unholy_Three', '1930', '72', '6', '2.5', '9', '0', 'short', '0']
[]
['87', 'The_Well', '1951', '85', '7', '3', '8', '0', 'short', '1']
[]
['88', 'Tom_Dick_and_Harry', '1941', '86', '7', '3.5', '11', '0', 'short', '1']
[]
['89', 'Triumph_of_the_Spirit', '1989', '121', '7', '3', '12', '0', 'long', '1']
[]
['90', 'Uncle_Moses', '1932', '87', '7', '2.5', '16', '0', 'short', '0']
[]
['91', 'Unsane', '1982', '100', '6', '2', '12', '3', 'long', '0']
[]
['92', 'Valley_of_Gwangi', '1969', '95', '5', '2.5', '11', '0', 'long', '0']
[]
['93', 'Valley_of_the_Dragons', '1961', '79', '5', '1.5', '8', '0', 'short', '0']
[]
['94', 'Vicki', '1953', '85', '7', '2.5', '9', '0', 'short', '0']
[]
['95', 'Volere_Volare', '1991', '92', '7', '2.5', '17', '3', 'long', '0']
[]
['96', 'Warning_Shot', '1967', '100', '13', '3.5', '12', '0', 'long', '1']
[]
['97', 'Whispering_Smith_vs._Scot._Yard', '1951', '77', '5', '2', '9', '1', 'short', '0']
[]
['98', 'Windows', '1980', '96', '4', '1', '9', '0', 'long', '0']
[]
['99', 'Windwalker', '1980', '108', '5', '2.5', '11', '0', 'long', '0']
[]
['100', 'You_Only_Live_Twice', '1967', '116', '9', '2.5', '14', '1', 'long', '0']
[]

Task#5:Delete the 'Description' column from the new_film_dict.csv file:

While with the regular reader and writer method we work with indexes, and is not so obvious by looking at an index, what value is suppose to hold, with the dictionary writer, we just remove the 'Description' from the field names:

In [10]:
with open('Film.csv', 'r') as csv_file:
    csv_reader = csv.DictReader(csv_file)
    
    with open('new_film_dict.csv', 'w') as new_file:
        fieldnames = ['', 'Title', 'Year', 'Time', 'Cast', 'Rating', 'Origin', 'Time_code', 'Good']
        csv_writer = csv.DictWriter(new_file, fieldnames=fieldnames, delimiter='\t')
        
        #Writes field names as header
        csv_writer.writeheader()
        
        for line in csv_reader:
            del line['Description']
            csv_writer.writerow(line)
In [11]:
with open('new_film_dict.csv', 'r') as csv_file:
    csv_reader = csv.reader(csv_file, delimiter='\t')
    
    for line in csv_reader:
        print(line)
['', 'Title', 'Year', 'Time', 'Cast', 'Rating', 'Origin', 'Time_code', 'Good']
[]
['1', 'A_Ticklish_Affair', '1963', '89', '5', '2', '0', 'short', '0']
[]
['2', 'Action_in_the_North_Atlantic', '1943', '127', '7', '3', '0', 'long', '1']
[]
['3', 'And_the_Ship_Sails_On', '1984', '138', '7', '3', '3', 'long', '1']
[]
['4', 'Autumn_Sonata', '1978', '97', '5', '3', '5', 'long', '1']
[]
['5', 'Bachelor_Apartment', '1931', '77', '6', '2.5', '0', 'short', '0']
[]
['6', 'Benson_Murder_Case', '1930', '69', '8', '2.5', '0', 'short', '0']
[]
['7', 'Black_Hand', '1950', '93', '5', '3', '0', 'long', '1']
[]
['8', 'Blaze', '1989', '119', '8', '2.5', '0', 'long', '0']
[]
['9', 'Blondie_Has_Servant_Trouble', '1940', '70', '9', '2.5', '0', 'short', '0']
[]
['10', 'Blondie_in_the_Dough', '1947', '69', '9', '2', '0', 'short', '0']
[]
['11', 'Brewster_McCloud', '1970', '101', '9', '3', '0', 'long', '1']
[]
['12', 'Calling_Philo_Vance', '1940', '62', '6', '2', '0', 'short', '0']
[]
['13', 'Car_Wash', '1976', '97', '10', '2.5', '0', 'long', '0']
[]
['14', 'City_Lights', '1985', '85', '10', '1', '0', 'short', '0']
[]
['15', 'Come_Out_Fighting', '1945', '62', '9', '1.5', '0', 'short', '0']
[]
['16', 'Conflict', '1945', '86', '6', '2.5', '0', 'short', '0']
[]
['17', 'Conquest', '1937', '112', '10', '3', '0', 'long', '1']
[]
['18', 'Dakota', '1988', '97', '6', '2', '0', 'long', '0']
[]
['19', 'Deadhead_Miles', '1972', '93', '12', '2.5', '0', 'long', '0']
[]
['20', 'Divided_Heart', '1954', '89', '7', '3', '1', 'short', '1']
[]
['21', 'Evergreen', '1934', '90', '5', '3', '1', 'long', '1']
[]
['22', 'Falcon_Strikes_Back', '1943', '66', '9', '2.5', '0', 'short', '0']
[]
['23', 'Find_the_Lady', '1976', '79', '6', '1.5', '1', 'short', '0']
[]
['24', 'Five_Golden_Hours', '1961', '90', '7', '2', '1', 'long', '0']
[]
['25', 'Flash_and_the_Firecat', '1975', '84', '6', '1.5', '0', 'short', '0']
[]
['26', 'Flight', '1929', '116', '6', '2.5', '0', 'long', '0']
[]
['27', 'Four_Jills_in_a_Jeep', '1944', '89', '12', '2.5', '0', 'short', '0']
[]
['28', 'Galileo', '1973', '145', '11', '3', '1', 'long', '1']
[]
['29', 'Hambone_and_Hillie', '1984', '89', '8', '2.5', '0', 'short', '0']
[]
['30', 'Hitler--Dead_or_Alive', '1943', '70', '7', '2', '0', 'short', '0']
[]
['31', 'Hold_Back_Tomorrow', '1955', '75', '5', '1.5', '0', 'short', '0']
[]
['32', 'House_Party_3', '1994', '94', '8', '1.5', '0', 'long', '0']
[]
['33', 'It_Came_from_Outer_Space', '1953', '81', '6', '3', '0', 'short', '1']
[]
['34', "Jason's_Lyric", '1994', '119', '9', '2', '0', 'long', '0']
[]
['35', 'Jessica', '1962', '112', '6', '2.5', '0', 'long', '0']
[]
['36', 'Kit_Carson', '1940', '97', '7', '3', '0', 'long', '1']
[]
['37', 'Kronos', '1957', '78', '5', '2.5', '0', 'short', '0']
[]
['38', 'Lady_Dracula', '1973', '80', '4', '1', '0', 'short', '0']
[]
['39', 'Last_Plane_Out', '1983', '92', '6', '1.5', '0', 'long', '0']
[]
['40', 'Mad_Love', '1995', '95', '12', '1.5', '0', 'long', '0']
[]
['41', 'Manhunter', '1986', '119', '7', '3', '0', 'long', '1']
[]
['42', 'Memories_of_Me', '1988', '105', '8', '2', '0', 'long', '0']
[]
['43', 'Murder_by_Television', '1935', '60', '5', '1.5', '0', 'short', '0']
[]
['44', 'Night_of_the_Dark_Shadows', '1971', '97', '6', '1', '0', 'long', '0']
[]
['45', 'Okinawa', '1952', '67', '6', '2', '0', 'short', '0']
[]
['46', 'Once_a_Thief', '1965', '107', '7', '2', '2', 'long', '0']
[]
['47', 'One_Crazy_Summer', '1986', '93', '8', '2', '0', 'long', '0']
[]
['48', 'Our_Man_in_Havana', '1960', '107', '7', '2.5', '1', 'long', '0']
[]
['49', 'Secret_World', '1969', '94', '5', '2', '2', 'long', '0']
[]
['50', 'Secrets', '1971', '86', '6', '1.5', '0', 'short', '0']
[]
['51', 'Seminole_Uprising', '1955', '74', '4', '1.5', '0', 'short', '0']
[]
['52', 'She_Demons', '1958', '80', '5', '1', '0', 'short', '0']
[]
['53', 'Sherlock_Jr.', '1924', '45', '6', '4', '0', 'short', '1']
[]
['54', 'Shout_at_the_Devil', '1976', '119', '5', '2.5', '1', 'long', '0']
[]
['55', 'Single_Room_Furnished', '1968', '93', '7', '1.5', '0', 'long', '0']
[]
['56', 'Sleep_My_Love', '1948', '97', '8', '3', '0', 'long', '1']
[]
['57', 'Smash_Up:_The_Story_of_a_Woman', '1947', '103', '6', '3', '0', 'long', '1']
[]
['58', 'Spare_the_Rod', '1961', '93', '6', '2.5', '1', 'long', '0']
[]
['59', 'Station_West', '1948', '92', '10', '3', '0', 'long', '1']
[]
['60', 'Telefon', '1977', '102', '7', '3', '0', 'long', '1']
[]
['61', 'The_Abominable_Dr._Phibes', '1971', '94', '5', '3', '1', 'long', '1']
[]
['62', 'The_Amazing_Transparent_Man', '1960', '58', '4', '1', '0', 'short', '0']
[]
['63', 'The_Boogens', '1981', '95', '6', '1', '0', 'long', '0']
[]
['64', 'The_Boy_Who_Cried_Bitch', '1991', '101', '10', '3', '0', 'long', '1']
[]
['65', 'The_Chocolate_War', '1988', '103', '7', '3', '0', 'long', '1']
[]
['66', 'The_Cockeyed_Miracle', '1946', '81', '5', '2', '0', 'short', '0']
[]
['67', 'The_Competition', '1980', '129', '8', '3', '0', 'long', '1']
[]
['68', 'The_Curse_of_Bigfoot', '1972', '87', '3', '1', '0', 'short', '0']
[]
['69', 'The_Great_Waldo_Pepper', '1975', '107', '8', '3', '0', 'long', '1']
[]
['70', "The_Hatter's_Ghost", '1982', '120', '4', '1.5', '2', 'long', '0']
[]
['71', 'The_Judge_and_the_Assassin', '1975', '130', '5', '3.5', '2', 'long', '1']
[]
['72', 'The_Last_Valley', '1970', '128', '6', '2', '1', 'long', '0']
[]
['73', 'The_Marriage_of_a_Young_Stockbroker', '1971', '95', '6', '2.5', '0', 'long', '0']
[]
['74', 'The_Miracle_Worker', '1962', '107', '7', '3.5', '0', 'long', '1']
[]
['75', 'The_Mutineers', '1949', '60', '4', '1.5', '0', 'short', '0']
[]
['76', 'The_Raven', '1963', '86', '6', '3', '0', 'short', '1']
[]
['77', 'The_Ravine', '1969', '97', '6', '2', '3', 'long', '0']
[]
['78', 'The_Revolt_of_Job', '1983', '97', '6', '3.5', '6', 'long', '1']
[]
['79', 'The_Romantic_Age', '1949', '86', '6', '2', '1', 'short', '0']
[]
['80', 'The_Siege_at_Red_River', '1954', '81', '5', '2.5', '0', 'short', '0']
[]
['81', 'The_Stone_Boy', '1984', '93', '8', '3.5', '0', 'long', '1']
[]
['82', 'The_Strip', '1951', '85', '4', '2', '0', 'short', '0']
[]
['83', 'The_Surrogate', '1984', '95', '7', '2.5', '4', 'long', '0']
[]
['84', "The_Twinkle_in_God's_Eye", '1955', '73', '5', '2', '0', 'short', '0']
[]
['85', 'The_Ultimate_Warrior', '1975', '94', '6', '2.5', '0', 'long', '0']
[]
['86', 'The_Unholy_Three', '1930', '72', '6', '2.5', '0', 'short', '0']
[]
['87', 'The_Well', '1951', '85', '7', '3', '0', 'short', '1']
[]
['88', 'Tom_Dick_and_Harry', '1941', '86', '7', '3.5', '0', 'short', '1']
[]
['89', 'Triumph_of_the_Spirit', '1989', '121', '7', '3', '0', 'long', '1']
[]
['90', 'Uncle_Moses', '1932', '87', '7', '2.5', '0', 'short', '0']
[]
['91', 'Unsane', '1982', '100', '6', '2', '3', 'long', '0']
[]
['92', 'Valley_of_Gwangi', '1969', '95', '5', '2.5', '0', 'long', '0']
[]
['93', 'Valley_of_the_Dragons', '1961', '79', '5', '1.5', '0', 'short', '0']
[]
['94', 'Vicki', '1953', '85', '7', '2.5', '0', 'short', '0']
[]
['95', 'Volere_Volare', '1991', '92', '7', '2.5', '3', 'long', '0']
[]
['96', 'Warning_Shot', '1967', '100', '13', '3.5', '0', 'long', '1']
[]
['97', 'Whispering_Smith_vs._Scot._Yard', '1951', '77', '5', '2', '1', 'short', '0']
[]
['98', 'Windows', '1980', '96', '4', '1', '0', 'long', '0']
[]
['99', 'Windwalker', '1980', '108', '5', '2.5', '0', 'long', '0']
[]
['100', 'You_Only_Live_Twice', '1967', '116', '9', '2.5', '1', 'long', '0']
[]

As we can see, in the new_film_dict.csv file, the 'Description' field is no longer exists.

Comments

Post a Comment